Code cleanup.

Consolidated Login and Logout functions to single controller.
Laying down foundations for signup.