You're about 99% correct, I have one minor disagreement with what you posted. Bear with me please.
The American military is not loyal to the President. More accurately, they are loyal to the Constitution. The military has to obey the orders of the President. (See the exception below.)
For reference, here's the Oath of Enlistment "I, _____, do solemnly swear (or affirm) that I will support and defend the Constitution of the United States against all enemies, foreign and domestic; that I will bear true faith and allegiance to the same; and that I will obey the orders of the President of the United States and the orders of the officers appointed over me, according to regulations and the Uniform Code of Military Justice. So help me God"
Exception: Every member of the military has the obligation to NOT obey unlawful orders. For example, if the President says "I want the 1st Mar Div to invade Los Angeles on Tues and rape every woman between 18 and 88." Then it would be the individual Marines' and Officers' obligation to NOT obey those orders because the orders are not lawful. Nuremberg taught us that "just following orders" is no excuse.