You gave him an attitude. It's rude. They are doing their job, just like anyone else, and they get sick of all of these *******s that have a problem with authority. Be polite to them, and they will be polite to you. This applies to everything in life.