Changed to getAccessToken function