Did a massive change to the internals which brought the idea of dispatcher and rewhacked the basic
internals to work properly with this idea.

Refactored auth and session management, plus added tests. Added support for mocking and used it to
test the auth code and cookie code.  Now have tests at the http level so further tests at this level
should not be needed.