Uses a class-based reimplementation of Django's existing function-based login view. The view also handles registration at the same URL endpoint. It depends on the submit button having a name of "login" or "registration" to determine which form was POSTed.
Auth is done using email addresses rather than username (which is a randomly generated string). The registration process enforces uniqueness, but this won't be enforced anywhere else, so we need to be careful not to duplicate email addresses in the admin or something.