Some fixes for authentication.