updated the authentication code