fixes to login logout exceptions