Username/password pairs in URLs need to be urlencoded.
Renew any expired tokens before making requests.