added a logout button, as well as cleaned up some code and sessions is pretty much working i think.