changed logout behavior