From any point of view, getting stuck into the ref is not something they should let people get away with. He is as much a symbol out there as anything else and letting the way he is treated be eroded is a slippery slope.
I was taught the captain, and only the captain, could ask why a penalty was given and could approach and address the referee respectfully, but not badger them etc. We were not allowed to argue. The captain could ask the referee to keep an eye on something if he thought it was an issue, but that you needed to be careful how you did that and if you did that.
Having players openly and passionately in arguments with referees, swearing at or in conversations with them - it should be yellow carded and put on report.
Apart from anything else, it sends all the wrong messages to junior players and sets a terrible example.
These guys aren't angels, and they are tough guys playing a hard game, but some of the behavior towards ref's I have seen lately is crossing a line.