Revert "fix cannot logout error"

This reverts commit d645fc376589c852cfb24c28372479c951d7b82b.
Revert "Revert "fix cannot logout error""

This reverts commit bf57b71b096fcfedd767c8af88254bc910737970.