added a method that generates an access token