Updating for csrf protection