Uber is having a terrible spell of bad press. First came the #DeleteUber campaign, in which hundreds of thousands of users deleted their accounts after the company undermined a pro-refugee protest among taxi cab drivers at JFK airport in New York City. Then came harrowing allegations, which Uber denies, about a culture of grotesque sexism and sexual harassment from a former female Uber engineer. Then Google sued Uber for alleged patent infringement as part of its driverless car program. Then Uber CEO Travis Kalanick had to apologize after getting caught on video fighting with a driver. Most recently, The New York Times reported the company uses a tool called "Greyball" to prevent local politicians and regulators from collecting data on its service. Outrage against the company has reached a fever pitch.

America's government should take advantage.

Uber has long been a direct threat to the well-being of Americans. But the reason actually has little to do with the recent spate of bad news. Instead it goes deeper, all the way down to Uber's core business. The fact is, horrendous news cycles aside, Uber — or any other similar company — still poses a serious monopoly threat to the entire taxi market. That's basically what its investors are counting on. And as I outlined in an earlier installment in this series, an unchecked taxi app company could result in incredible price-gouging, a technological arms race between it and riders, and further rotting of America's beleaguered public transportation. But now governments — whether municipal, state, or federal — might finally have a popular mandate to act.

So what is to be done? The answer is the natural and time-tested option to protect people from rapacious monopolies: regulation.

Of course, Uber and its supporters will insist that all the benefits of taxi apps are only possible because they disrupt the sclerotic and over-regulated taxi market. But this argument is ignorant of recent history. Taxi deregulation was tried in the '70s and '80s, and the results were disastrous: Drivers piled into the taxi market, wages collapsed, efficiency declined, roads became much more congested, pollution increased, service deteriorated, and prices actually increased. In fact, the results of deregulation were so awful that by 1996, all but four of the original 21 cities that tried it had largely restored their original controls.

Now, this is not to imply there's nothing socially worthwhile about taxi apps. Tens of thousands of users make it much easier to examine where taxi supply is most needed and direct drivers accordingly — so passengers don't need to cluster at queues. There's also evidence that taxi apps are much less institutionally prejudiced than traditional taxis, where drivers often refuse to service certain riders or certain neighborhoods. (The evidence comes from a UCLA study funded by Uber, though, so take it with a grain of salt.)

With taxi apps already commanding half or more of the taxi market in many cities, governments should already be thinking about how to channel the rise of Uber and its competitors in a positive direction — capturing the service and efficiency upgrades for their citizens, while avoiding the specter of the entire taxi industry falling under the control of a single company like Uber.

Here's a portfolio of regulatory options that would allow cities, states, and the federal government to do exactly that.

1. Launch municipal apps.

Uber presents itself as a simple marketplace — a service connecting riders to drivers. A truly neutral marketplace, however, would not have a structural interest in higher prices due to receiving a flat percentage of each sale. Even more fundamentally, a neutral marketplace would not fix prices across the entire market — instead, the price for each transaction would be individually determined between seller and buyer.

But Uber instead acts as a price cartel, coordinating forced price movements across its entire taxi fleet. This is because it is an ordinary business, not a self-contained marketplace. But suppose it was? This could be an intelligent choice for city governments looking to channel the service upgrades of app-based taxis in a positive direction.

A municipality could build and maintain a taxi app, or contract with a private company to do it. This app would be truly neutral, allowing any taxi company or service to use it — serving as a sort of clearinghouse for taxi rides. But in order to register one's employees on the app, companies would also have to follow safety standards, obtain good insurance coverage, and provide proof of maintenance and a good driving record. They would be further required to serve everyone, including handicapped people, and accept rides to any location within the city.

Indeed, this is already happening: In San Francisco, the company Flywheel is building an app infrastructure to sell to cities, while Austin (spurred by Uber and Lyft leaving following a regulatory ballot initiative) and Washington, D.C., have built custom hailing apps for their traditionally regulated taxis. These efforts should be replicated.

2. Regulate prices.

If a "public option" for taxi apps is a bridge too far, governments could institute a rule "akin to the Affordable Care Act's medical loss ratio," says Frank Pasquale, a law professor at the University of Maryland. Such a rule might stipulate that app-based companies could not take more than 15-20 percent of a driver's fare, thus incentivizing competition on service rather than trying to achieve a monopoly and then ratcheting up the percentage of the fare taken. That would fit well with a rule mandating that "multihoming" — that is, when independent contractors use more than one app-based service — be allowed.

This raises the issue of how prices might be determined. Traditional taxi regulation typically includes some kind of fixed price schedule determined by a local commission, partly because price competition on the street or at the taxi stand is so impractical. However, app-based services make price comparison and shopping feasible — one of their biggest innovations. It ought to work reasonably well most of the time.

Cities might still influence prices to some degree, though. Regular taxi riders have a notably strong preference for price stability, even at the expense of time spent waiting. In an unequal society like the U.S., this may be perfectly rational, as the market-clearing price during times of high demand may be far out of reach of ordinary people. Therefore, cities could institute a maximum fare (perhaps a low multiple of studied market conditions), to prevent outright gouging during holidays or emergencies, as Uber infamously did during a hostage crisis in Sydney.

Perfect price discrimination, as outlined in my previous piece on Uber, also ought to be banned outright. Demand-based pricing is one thing, but identity-based discrimination is more trouble than it's worth.

3. Gently cap the number of drivers.

While they provide many pricing opportunities, apps do not solve the problems created by too many drivers in the taxi market. The massive expansion in taxi driving brought on by Uber and others have re-created some of the negative conditions experienced by cities under taxi deregulation. Wages are plummeting in many cities — and Uber itself is seeing enormous churn among its drivers.

Economists as a rule dislike barriers to entry, and a full treatment of taxi drivers is beyond the scope of this article. But the previous experience of deregulation shows that if drivers cannot obtain at least a reasonable income, the sector as a whole will suffer degraded service, lower productivity, and potentially even higher prices. Taxi driving is an unusual job where the vast majority of the population already possesses the bare minimum of skills and equipment to do it — but it's a dangerous and fairly difficult one to do well, requiring above-average driving skills and a lot of knowledge of city streets (though much less than in the pre-GPS days).

Outright caps on the number of cabs (the regulation attempted by New York City and defeated by Uber) is the simplest and least justifiable method of protecting driver incomes. A taxi medallion should not cost over a million dollars — indeed, that is a sign that much of the value created by the taxi industry is being captured by owners and investors rather than drivers.

However, reasonably tough regulations on insurance, safety, or congestion (in many city centers, taxis are a large fraction of all traffic) can serve much the same function. In London, for example, drivers have to pass a difficult knowledge test to drive a cab — a more legitimate and useful barrier to entry.

The driver rating system implemented by Uber is a worthwhile development, particularly insofar as it reduces sexist harassment. Yet it is not wholly fair — drivers are generally simply fired if their star rating falls below four out of five stars. Therefore, drivers "ought to be able to contest one-star ratings," says Pasquale. This would militate against abuse from prejudiced (or belligerently drunk) passengers.

4. Deal with driverless cars.

There is also the potential future of driverless cars. A car capable of driving itself around would obviously "solve" any labor problems by throwing all taxi drivers out of work. That is basically why Uber has a pilot driverless taxi project in Pittsburgh; any company that develops a workable and reasonably cheap driverless system would be tremendously profitable. Still, such systems are still early in the testing phase, and are many years from availability, at the earliest.

But should they reach feasibility it would also further justify regulation. Even driverless car boosters admit that a workable system would likely require huge public investments in painting, signaling, upgraded roads, and perhaps even dedicated lanes. All that in turn will require a competent public authority to set standards and adjudicate disputes between companies — all the more reason to place the public good ahead of corporate desires. Transportation policy should not be about funneling gobs of profits to people who happen to own a lot of machinery.

5. Make it a federal issue.

This raises the question of the appropriate level of government at which to implement regulation.

Relying on cities alone is likely to be unstable. A sufficiently determined city government ought to be able to maintain its own rules, but it would be a challenge in practice. A half-consolidated monopolist would have a relatively huge amount of money and lobbying muscle compared to the average city, making it easy to pick off the regulated cities one by one.

One exception is New York City. Strong and effective regulation here would mean covering roughly a third of the entire American taxi market at a stroke. Indeed, there are signs that Uber may have already run up against structural limits in its business model there. App-based hailing is a large upgrade in service in most places, but in a dense downtown with constantly circling taxis, it may be even more convenient to simply step outside and hail one of many passing cabs. So if New York were successfully regulated, it alone could serve as a regulatory bulwark, in addition to a prominent example as the most famous and media-saturated city.

Overall, though, state-by-state regulation might be somewhat better than cities, but it still creates a patchwork system ripe for abuse. In fact, many states have already passed rules basically written by Uber lobbyists.

So federal rules are still the best option. There may be some legal wrangling around the Commerce Clause, but Uber and its competitors are nation-spanning companies delivering a nationwide product. There is no reason to think that Cleveland or Mississippi will benefit from being able to implement their own "customized" regulations separate from those governing New York City or North Carolina.

And, as I wrote previously, many of the worst parts of a hypothetical Uber dystopia simply depend on lack of competition. The federal government should thus start enforcing anti-trust rules to ensure that every major taxi market has a reasonable number of competitors (say, four to five). It's a simple step but it's also the most important one for curbing monopolist abuse. As Barry Lynn explains in his book Cornered, such laws are still on the books, so about all that is needed is a new set of political priorities at the White House.

Moving the citizenry around is one of the fundamental tasks of a city, and one at which American cities are notoriously bad. A national taxi monopoly would make that situation significantly worse. Every cab ride would be precisely calibrated to squeeze as much as possible from your wallet — and the effects on public transportation could make such rides hard to avoid.

For the time being at least, Uber and Lyft have improved the experience of getting a taxi in most U.S. cities. But it's easily possible to imagine a near future where moving around our cities is a hideously expensive hassle instead, throttling whole metro areas just to line to pockets of a few corporate executives.

But that future can be avoided with thoughtful, judicious government regulation. Regulation is like the immune system — too aggressive, and you get allergies; but too apathetic, and your body is defenseless against predatory disease. It's time for America to start taking its vitamin C.

This is the second article in a two-part series on Uber. The first installment is here.