It has been narrated in one hadith that, once a man
spitted facing the Kaaba and Rasulullah said that no one should pray
behind him. Then on the basis of this hadith, if some one insults Rasulullah
why should we pray before him.

Dearest brother, there is no such hadith to my knowledge nor any such
prohibition. To my knowledge, the hadith in question only states that the
Prophet once saw sputum in the mosque and
told the Companions that no-one should spit in the direction of his prayer
for at that moment Allah is facing him; so the person should spit under
his left foot [in a mosque where the floor is gravel] or into two folds of
his garment. This applies to people who lived in harsher and less genteel
conditions than we.

Yes there is a report from one of the salaf - Bishr ibn al-Harith or
al-Fudayl ibn `Iyad - that he traveled to hear a hadith from someone and
when he arrived at that person's location he entered the mosque and saw
him spit on the wall of the mosque. Whereupon he turned right around
without asking him anything, saying: "This man cannot be entrusted to
transmit the words of the Prophet if he has
such poor adab."

Spitting facing the Ka`ba is bad adab, it does not take one out of Islam
nor does it cancel his wudu' nor make his imamate invalid. But, like not
wearing anything on one's head, or wearing tight-fitting pants, it is only
bad adab that the imam - of all people - should be the first to avoid.
Allah knows best.