Minor fixes to authentication system.