changed login/logout behavior