fixed user logout bug