fixes to logout