Temporarily disable the mysteriously buggy custom userId getter function and just use req.user._id instead.