Switched to using django example code for getting cookie.
Added Django middleware for setting CSRF token on every request.