Bug fix for authentication.