Article Two of the United States Constitution
If the Vice President and the Cabinet say a President is unable to do his job, the President can still try to take control back.  However, if the Vice President and the Cabinet still think the President cannot do his job, they can challenge the President's return.  If two-thirds of both the House and Senate agree, the President is declared unable to discharge his duties and the Vice President stays in control of the Presidency.