[SD] add logout function.