Improved logout

Now destorys session as well as javascript data when you log out.