This is out of the scope of "free speech". Can someone stand up in a court of law and scream at the judge to shut up and call them names and be protected by "freedom of speech"? No he is not at all within his rights, he was maliciously taunting and slandering individuals.
"Freedom of speech" is for protecting the expressing of unpopular views. It does not protect all kinds of behavior where some kind of expression is involved.
This is not out of the scope of free speech. Writing something on the internet is not going to start a panic. He didn’t yell the equivalent of fire. All he did was insult the he** out of people. They may have a slander case against him if they decided to sue him but jail time is over the top. The whole idea of free speech is that the person saying the speech is allowed to say things that may be difficult for others to hear and not suffer any retribution for it.