Improvements to refreshing access token.
Corrects API url.