The Supreme Court ruled in Trump v US that anything that the President does while in office as an official act he has absolute immunity from, and that specifically includes insurrection against the government, as long as he believes it's in the best interest of the United States.
So, under US law (I'm not exaggerating) those things are all legal.