fixed logout bug: