Modify Logout function