[#74153904] Unit tests and acceptance tests around login.

- Unit tests for User, Admin, and UserBase models.
- Acceptance tests for the Sessions controller, written with an eye for
  API documentation.
- Cleaned up some deprecated calls from representers.
- Minor code fixes / tweaks to handle edge cases discovered by tests.
Merge branch 'feature/74153904-login-code-has-unit-tests' into develop