troubleshooting CSRF Uncaught Object error