merged changes to authentication.java