fixed logout bug. 2nd try.