Kratos hooks have broken imports
Since the kratos upgrade, the hooks for tracking last login and last recovery are broken. The code serving those hooks still refers to JsonPatchDocument no longer exists.
Besides fixing this, we should also include the improved error logging from !161 so we can actually see this failure in the logs. Currently this is not visible because error responses to requests do not generate additional log lines.