Fix a token logout bug