Added CSRF protection to photo upload process