repaired more login/logout weirdness