add a setAuth function to set access token.