The below code returns user details properly
const loginUser = asyncHandler(async (req, res, next) => { const { email, password } = req.body; const use