My family is racist

I need opinions on if I'm handing this situation right. My husband is Hispanic, I'm white, and we have two perfect daughters together. Well my whole life my family has said racist things about Hispanics (calling them sand n**ers, saying they are all illegal, they are all ceimals, ext...). Well this is still continuing, they even say it in front of my husband and my daughter's (they were babies at the time) and they claim "Well it's not about him or your kids." So I told them they aren't allowed around my kids anymore since they disrespect my husband, his race, my kids race, and my husbands family literally in front of him and my kids (not to mention calling me a lot of choice words because I married him). So since I've said this I get mean messages at least once a week saying how I'm "mentally ill" or how I've "given up my entire family for his (my husband's family)." Would you guys handle the situation the same way I am, by telling my family they are no longer allowed near my kids, or do you ladies have any other advice for me.