Updates to authentication code