fix missing code to retrieve access token. add comments.