At five weeks of age, the chicks are still learning what's food and what's not. Even your finger will appear to be food, and a hungry chick is going to compete for it. Notice there's less biting when you are offering food to one chick at a time. Even my youngsters at nine months still get excited when I have food and they will clamp down, twist and yank in order to be the one who gets it ahead of the others. To save skin, I try to use leather gloves when feeding treats to the whole group.
To discipline a chick who is mistaking your hand for food, jab a finger at the back or side of its head. This is how older chickens teach the young who are getting out of line. A chick knows exactly what this means and will remember it.
Then there are older roosters and hens who have a mean streak due to bad temper and mistrust. I deal with both by pushing them to the ground, holding their head on the ground until they relax. This is to demonstrate I am dominate. When I let them back up, I give them the finger jab to the head to let them know they're behavior was out of line.
Biting is much different than being pecked. Those of us who have been drilled by a strong, sharp beak know the difference all too well. It can cause serious injuries and shouldn't be ignored. Chickens are entirely capable of being disciplined and trained out of bad behavior. But you have to be consistent and always follow through, just like dealing with any animal.