using cookies from endpoint