Improvement to logout.