I dropped a database from SQL Server, however it turns out that my login was set to use the dropped database as its default. I can connect to SQL Server Man
Alternative to sp_defaultdb (which will be removed in a future version of Microsoft SQL Server) could be ALTER LOGIN:
ALTER LOGIN [my_user_name] WITH DEFAULT_DATABASE = [new_default_database]
Note: unlike the sp_defaultdb solution user and database names are provided without quotes. Brackets are needed if name had special chars (most common example will be domain user which is domain\username and won't work without brackets).