Re: bad behaviour
I know it would be difficult, but if they are at your house, and they don't want to abide by your rules, then tell them you don't want them to visit. Some children are very much influenced by what others are doing, and if your son is going through that stage, then you need to keep him away from that influence as much as possible. if it were a friend of your sons who couldn't behave, and his mother wouldn't make him behave, would you continue to let your son play with him?
If keeping family away just is not an option, then you have to make sure to talk to your son and remind him of what you expect his behavior to be. After the "problem child" leaves, talk to your son again about what sorts of things his cousin did that are unacceptable. Say things like "Johnny was throwing things, and we don't do that, because its not nice, do we?" Choosing your words to get his agreement is crucial.
My 7 year old went through a similar stage between ages 5 and 6 1/2. He would do things he knew he wasn't supposed to, just because someone else did it. We continually talked about right and wrong. And he always got punished for doing something he knew was wrong just because he was copying someone. I always made sure to tell him he was in trouble because he knew what he was doing was wrong. I would always follow-up with "next time you'll be able to make a good choice, and do what you know is right, won't you?" It took a while, but know he tells his friends, and his younger brother, "I'm not doing that, because it's not the right thing." or "I'm not allowed to do that."
Good luck. Dealing with family is NEVER easy.