Fixing issues with authentication.