Include entire response body in failed upload error log message
Refresh access token when it expires

* Fixes #2.