added the code to get the authentication token