Add protection against CSRF
Begin API support