Added login/logout to the main interface.

* Updated the base template to be aware of the current user.
* Hooked in many of the pieces of Flask-Login.