modify WriteLocalAccessToken method of master branch