Add XSRF support. Closes #14