updated logout manager code snippet