Merged in changes by Conrad Irwin.

Moved authentication system over to OAuth tokens.