[logout]add a new function.