Whether the actions were legal or illegal, that is one discussion and going strictly by law, nothing illegal happened here. I am sure everyone will agree to that, lawyers have already chimed in saying that what occurred was not illegal. The main discussion is whether this was right and the actions by United was on the extreme side of wrong. When they make a mistake and overbook the flight, then make the mistake of allowing passengers to board already instead of taking care of this at the gate, they should have found a solution that did not involve calling security to physically remove someone. Offer more incentives, offer more vouchers. The person who made the decision to call security to forcibly remove a passenger, even though legal, should be sacked immediately.
It could probably be argued that what the officer did was assault, which is illegal. That would depend on how a court decided though (assuming it went that far).
It's easy for the aviation security officer to make up an excuse like in this case, saying the passenger was belligerent. Anyone who is being forced off a plane against their will can be non-cooperative, which they can easily claim as belligerent.