Refactoring into classes.
Refactoring auth and user tests.