Removed some lines from logout function