If you're resisting arrest, the police officers are allowed to beat you, without hesitation. Next time, don't resist arrest.
Actually, even if you weren't resisting arrest, police officers can still beat you, as long as they're yelling, "STOP RESISTING! STOP RESISTING!"