Fixed the NullPointer for ProtectRedirect
Added implementation to fix API with CSRF protection