United Airlines posts smaller quarterly loss as travel rebounds