Adding sessions and flashes. Improviding error messaging.
Addning logout functionality and a 404 page.
Updating the registration and login templates.