Law that made it illegal to criticize the President?

There is no law that makes it illegal to criticize the president. Those freedoms are protected by the free speech clause of the first amendment. However, making threats against the president is illegal.