Compatibility with new Oauth2 api authentication

* Removed the last vestiges of the old REST Api.
* Add Authorization: Bearer access_token header
* Move some file, comment, etc operations to new api.