SO MUCH FAIL!!!
Wow; I thought they'd been trained on this. I've not heard of a DMV issue in a long time, but maybe the word isn't out throughout the whole state.
You were 100% absolutely in the right. They failed at every level one can possibly think of. We need every OC'er in your area to immediately think of a reason why they have some legitimate business to take care of at the DMV. When was the last time you all walked in and got a free print out of your driving record?
Now, you could have forced the security guard to trespass you. The paperwork would have hung them all. As it is, you got kicked out with no paperwork, and all we can do is write letters and try to get them to read the rules.
Please keep us posted and do not let this drop. Thank you for asserting your rights as much as you did. They will certainly remember this issue when they get called into the principal's office about it.