Boyfriend

I need help !! I have a boyfriend I have been dateing for a while. He acts like he really loves me, but when he gets upset with me he can be really mean. He also flirts with other girls and I talked to him about it and said she is a really good friend. What should I do?