Need advice please

When I had my little girl my husband was still finishing college and only could work on the weekends so I had to work as much as possible so we could pay bills. My little one stayed with mg mother in law would watch her while I worked, in December I recently started staying home because my husband graduated and got a full time job in May. We are currently closing on a house and we are staying with my inlaws, my little girl is attached to my mother in law. She always chooses her over me. When she's hurt she runs to her, when she wants rocked she goes to her, when she wants held she goes to her and I've tried to comfort her and be the one she goes to put she doesn't want me and she cries and wants her grandma. It breaks my heart more and more every time she does it because it makes me feel like I'm not her mom. I'm at a loss and don't know what to, I'm praying that when we move into our house I can spend more time with her and she'll want me instead but how do I do that without cutting out my mother in law. I know it's my fault because I worked when she was so little, I just wish she would want me more often. I'm currently pregnant with my son and it makes me never want to go back to work because this feeling sucks. I'm just looking for some advice or if anyone had a similar situation what they did. Thank you all and sorry for the long post.