Handle logout.