Improvements for authentication.