add the logout function