Made the endpoint url a variable and fixed how it removes cookies.