Moved the csrf token to the IEEE global object. Before the variable could have been assigned before the page loaded. Now, because its enclosed in an jquery onload function, it's guaranteed to work.