Can police misbehave

Hi today I was @ gym and suddenly there was a rush and we come to know that a phone is stolen from the gym premises. Only four boys had completed the exercise and had gone to their respective homes. Since it was the case of theft the owner of the phone called police on 100 police showed after 3hrs and takes the four boys with them . The owner of the phone was really scared from the police and had very little to say. 1 of them was my friend so I to had to go with him to police station there he made all the boys sit in floor. My friend is a educated student and I feel very bad for him . They were giving abuses like hell and scolding them without any proof We requested the owner to take back his complaint and let the students go. The owner did same but he was also bullied by the police .at last they released the students after 4hrs . I am just asking that is this was the correct procedure Can police beat anyone anywhere. Is Indian citizens safe I myself is very scared of cops I don't know why.