M.G.
A., I had the same problem with my daughter now 5. She slept with me until me and my husband got married. Was a single parent and tired so I gave in a lot when it came to bed time, but knowing that I was going to get married and my soon to be husband wouldn't appreciate it we came up with ideas or games to play with her rewarding her when she slept through the night in her own bed. We kept a night light on in her room and that seemed to help. Basically each night she slept in her room she was rewarded a star if she got 5 stars she got to pick a prize out of box I had of little dollar store items. My daughter was 3 when I was doing this, but it might work with a 2 yr old. Good luck and wish you the best! M.