Logout function now logs out.