Updates for the backend javascript for XSRF. Using POST only when necessary. RE: #1874
Merge