Logout now works, some cleanup in the session management.