Fixed up a lot of the middleware, including the body parser and csrf.
Added mongodb session storage.
Updated the version number to 0.5.0