added update logic and changed CSRF protection to CI from Ion Auth