save endpoint url into cookies