Fixed a logout issue with not destroying session