finish logout.