President signs law labeling criticism of state officials “extremism”