About the referendum it is indeed ilegal, as anyone that knows spanish law and constitution do inmediately realize. It was the Judges and not the government who sent the police to seize the ballot boxes.
Illegal or not, you shouldn't beat your own people for: a) Peacefully protesting. b) Voting.
I do completely agree. Noone was beaten for that (trying to vote or peacefully protesting). Police had orders from Judge to seize ballot boxes, the only people that were beaten were actively hindering (not sure if that is the right english word) the police job. In fact, in most the places they were not able to comply orders because it would have mean a major confrontation and put people (and police units themselves) in higher danger.
I do also recognize this incident have had a very bad impact in international media. It would have been way better to have intervened way sooner and just arrest the promoters of the rebelion without exposing any law-abiding citizens to any innecesary risk.
I think your statement is overzealously defending the police going by the pictures we saw from abroad. Regardless only a total imbecile would expect seizing ballot boxes in such a case to be peaceful. The vote could still have been regarded as illegal if more votes ended up in the ballot boxes. No need to drag women by their hair.
It's not as if this Catalan independence thing hasn't had any history.
Joke reaction by Spanish government.
Joke reactions by the EU.
No wonder people want to go back to nation states where possible.