My experience with law enforcement and others has been that your attitude determines the treatment you receive in return. If you're respectful and cooperative, you'll usually be treated with respect. If you are uncooperative and let them know what you think of them, and argue about their right to do whatever they're doing, they'll be curt and more insistent. If you use force to resist them, they'll swarm you, wrestle you to the ground and handcuff you behind the back, and take you to jail.
It's about the same with any service personnel. If you go into a McDonald's and are nice to the clerk, you'll get your burger and fries. If you're not nice, you'll get your burger and fries and a dollop of phlegm. It's almost always best to be nice to service personnel.