Creating the Logout function