fixing logout problem