Added support for logging in.  

Main page is still accessible directly through /main.

No session functionality yet.