Added OAuth.

OAuth has been added and each API that accepted an authorization token will now perform a new check that will enforce the scope of that token.

Closes #693