Changing req.data to req.user