Fix bug of logout system.