All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
First of all, it should be noted that the religious criterion for distinguishing sects and groups is according to the extent to which they follow the methodology of the Prophet and his companions. So these sects who claim to be affiliated with Islam may be close or far from this methodology. There is no doubt that Allaah named us Muslims. Allaah says (which means): {It is He (Allaah) Who has named you Muslims both before and in this (the Quran).}[Quran 22:78].
However, being characterised by Ahlus-Sunnah, or Ahlul-Athaar, or Ahlul-Hadeeth and the like does not contradict the name of Islam, as long as the purpose of these names is not meant to discriminate between one group and another but just to distinguish between them. Indeed it is reported that the righteous predecessors used some of these expressions like Ahlus-Sunnah Wal-Jamaa'ah and Ahlul-Hadeeth, and the like. For instance Ibn 'Abbaas interpreted the saying of Allaah (which means): {On the Day [some] faces will turn white and [some] faces will turn black.}[Quran 3:106], to mean that the faces of Ahlus-Sunnah wal-Jamaa'ah will be turned white (regardless of their original colours in life), while the faces of innovators and those who scattered into sects will be turned black (regardless of their original colours in life).
Nonetheless, it is forbidden to use these names as a way of being fanatical like the Pre-Islamic fanaticism in a way that one loves or hates people just because they are affiliated with a given group or sect. The Prophet said: "The one who calls to the slogans of Jaahiliyyah (Pre-Islamic Era) [blindly supporting a people regardless of them being just or otherwise] will be of the people of Hellfire". A man asked: "O Prophet of Allaah! Even if he prays and fasts?" The Prophet replied: "Even if he prays and fasts, so call each other as Allaah named you: Muslims, believers, slaves of Allaah".
Ibn Taymiyyah said about these names: 'It is not permissible for anyone to test people by asking them with which group among these groups he is affiliated, and he should not consider one of these groups as friends and helpers and consider the others as enemies. Indeed the most honourable of people in the Sight of Allaah are the most pious amongst them regardless to which group a person belongs.'
As regards declaring one's pledge to an Imaam [or Muslim leader], many narrations have been reported in this regard. For instance, the Prophet said: "One who defected from obedience [to the Muslim ruler] and separated from the main body of the Muslims, if he died in that state, he would die as one belonging to the days of Jaahiliyyah (i.e. non-Muslim)." The meaning here is to declare one's pledge to the greatest Imaam (the leader of all the Muslims). So whoever claims instead, that allegiance should be made to himself, or to the leader of his sect is wrong, because one is only obliged to declare his allegiance to the Muslim leader.
Finally, it should be noted that declaring Muslims to be deviant people is something very dangerous, so one should not do this without evidence, because in principle Muslims are free from that [unless it is proven otherwise].
If the matter reaches the point of declaring someone a Kaafir (a non-Muslim) then the matter is even more serious, because declaring a Muslim as a non-Muslim implies deeming his blood and wealth permissible after they were protected and safe. The Prophet said: "Any man who says to another 'O Kaafir' (disbeliever), it [this word] will be applied to one of them." [Al-Bukhari and Muslim]
Allaah knows best.