Added authentication and tests

Needs users, authentication for users, and tests for both of those.