adding function to set access token from js