Removed redundant check of the default database when a user with proper credentials is being authenticated.