solve logout bug