Beyond frustrated

So I’m due very soon and my boyfriend and I have a cat & a dog who have been completely spoiled their whole life. My boyfriend just spoils this dog like no tomorrow it’s honestly over board. So since the baby is coming soon I started locking them out of our bed room at night since cats can be a safety issue with babies and since the cat can’t come in neither can the dog. They are Inseparable so the cat would meow all night if he didn’t have the dog out there to. They havent been handeling it well and I can hear them up all night and clawing the door at night.. this is the second time I’ve woken up to my dog shit and pee on the carpet. He’s acting up because he’s not allowed in the room. I’m going to kill the dog ( not literally ) I don’t have much of an attachment to him I know that sounds awful I love animals but I just find this dog pretty annoying and never got that feeling I have with other animals but I love love love my cat. So I have no idea what to do and if this continues to become a problem ...I don’t believe in rehoming pets but I feel like it’s gonna get worse! Oh then after I cleaned up the mess he pees again! And he never ever ever has accidents normally ! He’s trying to prove a point. And this is the second time he’s done it out of the 4/5 nights hes been locked out