ch.7 login logout fixes