Logout functionality fixes #11