There are many Ayat (Verses) in the Qur-an that clearly describe the two authorities for Muslims to obey - Allah and the last Messenger of Allah, Muhammad صلى الله عليه وسلم.
Some of those Ayat (Verses) are given below.
Recitation of the Qur-anic Ayat (Verses) is by SheikhHusri
Say (O Muhammad صلى الله عليه وسلم): "Obey Allah and the Messenger (Muhammad صلى الله عليه وسلم)." but if they turn away, Then Allah does not like the disbelievers.
Surah (Chapter) Al-e-'Imran(The Family of 'Imran) 3:32
These are the limits (set by) Allah (or ordainments as regards laws of inheritance), and whosoever obeys Allah and his Messenger (Muhammad صلى الله عليه وسلم) will be admitted to Gardens under which rivers flow (in Paradise), to abide therein, and that will be the great success.
O you who believe! Obey Allah and obey the Messenger (Muhammad صلى الله عليه وسلم), and those of you (Muslims) who are in authority. (And) if you differ in anything amongst yourselves, refer it to Allah and His Messenger (صلى الله عليه وسلم), if you believe in Allah and in the Last Day. That is better and more suitable for final determination.
And whoso obey Allah and the Messenger (Muhammad صلى الله عليه وسلم), then they will be in the company of those on whom Allah has bestowed His Grace, of the Prophets, the Siddiqun (those followers of the Prophet who were first and foremost to believe in them, like Abu Bakr As-Siddiq رضي الله عنه), the martyrs, and the righteous. And how excellent these companions are!
He who obeys the Messenger (Muhammad صلى الله عليه وسلم), has indeed obeyed Allah, but he who turns away, then we have not sent you (O Muhammad صلى الله عليه وسلم) as a watcher over them.
O you who believe! Obey Allah and His Messenger, and turn not away from him (i.e. Messenger Muhammad صلى الله عليه وسلم) while you are hearing.
Surah (Chapter) al-Anfal(The Spoils of War) 8:20
It may be quite evident by these Ayat (Verses) that only Allah (God) and His last Messenger, Muhammadصلى الله عليه وسلم are to be obeyed in all matters of religion.
One should seek guidance from the Qur-an and the Sunnah (Traditions of Muhammad صلى الله عليه وسلم) the only two sources of Islamic knowledge.