Adapt CSRF protection in Rails applications and webservices to handle AngularJS clients