If you are sysadmin, Your default database set to one of the user database. If you decide to take offline for your default database before you set default to another database.  You will get the following error:

Cannot open user default database. Login failed. Login failed for user 'xx'

There are the steps below login to server to access master database and then you can set your default database.

PROBLEM           
1. Connected as a sysadmin (windows authentication domain\username)
2. Connect to database server
3. Take offline  your database DB_WH_Report
-- I connected
4. Disconnect to Server
When you try to connect back

ERROR
Cannot open user default database. Login failed. Login failed for user 'xx'

SOLUTION                          
1. Connect to Server
2. Click Option to expand  Connection Propertise
3. Connect to Database Type master
4. Click Connect button