modify login function to store the access token

 Please enter the commit message for your changes. Lines starting