I finally found the solution. just remove the crazy translate function `__('messages.invalid-password')` and it will work fine. Also, you may need to remove send() function.
return response()->json(['error' => 'Invalid Password'], 401);