fix auto logout bug