Adding some haphazard security middleware code
Fixed a couple of coding errors.
Added hook for custom login.
Added manual logout page.
Threw some login code up in this bitch.
Swapped external middleware for custom alternative.
Merge branch 'security'