a logout function and url