rm logout fn