Logout works, bugs in sessions fixed

Ok, so there were a couple bugs in my last update. Fixed those. Also
added a logout option.