adding code to read/save access token to a json, and automatically refresh the token