fixing logout bug