Implemented CSRF protection