Use angular_rails_csrf gem

In Rails 4.2 `form_authenticity_token` are masekd and it varies with each request.

This gem sets a cookie so can be used to verification.

This PR fixes issues in repo_sync call.

Details here
http://stackoverflow.com/questions/14734243/rails-csrf-protection-angular-js-protect-from-forgery-makes-me-to-log-out-on