checks for csrftoken cookie and adds X-CSRFToken http header on POST, PUT, and DELETE requests