Implement oauth, prep backend

Done very quickly, so probably haphazard. Lots of changes.

Remaining things besides cleanup
1. Implement stub functions
2. Build views