Git rid of all that craziness.
Work with Angular's CSRF protection.