Good for you. I think that maybe your dog likes to sleep with your little one. I know my pets love to be near me when I am sleeping. Does your dog have his own bed in the house? Maybe next to the crib?
I am glad that your temper didn't get the best of you.
(Sasha out Malamute would always try ot sleep on the couch, No matter how hard we tried she would find a way to sleep there. She was stubborn)