Salaams to all,

I am very confused as i have asked many people whether it is permissable to pray behind the imam in makkah and medina, i have had various answers such as:
1) we shouldn't becasue the ahle-sunnah wal jammat belive that Imam's disrespect the prophet (Peace be upon him)
2) You should becasue Prophet muhammad (Peace be upon him) “Whoever performs forty prayers in this my masjid, destined for him is the freedom from Fire and redemption from the punishment, and he becomes immune from hypocricy'.
i have approached the Iman of my local mosque and told me not to, however when i went last year i didn't feel what i was doing was wrong and had purely the intention of praying with jama't for ALlah alone.
I dont know what to do as i will be going for umrah this ramadhaan.