improvements to authentication