Removed unnecessary code from logout.