How can he be president?
The answer lies within the literally tens of thousands of pages of what those of us interested in the workings of the country have come to call "laws." How, then, can one know where to look in this massive volume of text? I can give you a shortcut: the ones we're interested in for this question are not part of the enormous and confusing "United States Code", but in an even earlier foundational document known as the "constitution" and its various "amendments".
We can dive deep, deep into the arcane depths of this "constitution", to areas only understood by high school civics students after the teacher has assigned each of them to do a presentation to the class about a specific article, to find a mysterious "college" of "electors" described in article 2, section 1 as well as in the 12th amendment. In theory, if these "electors" agreed with your assessment that there are "serious doubts concerning his loyalty", they could prevent him from becoming president.
The last line of defense (looking now at article 1, section 3) is a slightly less mysterious body known as the "congress" (again, stipulating they agree with your claims) who can "impeach" the president and thereafter remove him from office.
A few might argue there is even a further defense, involving people fighting against their government in armed conflict and creating a new government afterwards, but obviously that is preposterous and has probably never been tried.
I hope this has been helpful in showing how these "laws" are used even in situations that have driven many Americans to extreme heights of emotion, and can provide solutions to even the most serious problems our nation faces.