Login form fixes

Login form is rendered with more granularity using Django's templating language, so if you need help on how to render different form fields individually take a look at the login form.

UserDataMixin should provide some useful data about the user in all the views. It's also an example of how Python mixins work with class-based views.

Also some general code cleanup