Fix a bug for worker logout.