refine logout