fix logout bug