I agree that staff should never be rude and if you feel strongly about it, submit a complaint. What they should/could have done was offload you if you were presenting yourself at the gate after the official cutoff time, but there's no need for shouting or harassing customers.