S.A.
I don't have a little girl (I have a son)... but oh how I can relate!!!!
My son, who is now 6, came flying out of the bathroom when he was 4. He was dying to show me that he could "make it grow like a plant". It was all I cuold do to keep a straight face (my emotions were all over the place at that point!).
I told him that it's his private part and he can only touch himself in private - his room or the bathroom (but not bathrooms at other peoples homes or in public bathrooms). It took some persistennce (I'd catch him absent-mindedly touching himself while watching a movie, for example), but eventually the reminders worked. I'd send him to his room for "private time" - sort of like timeout - he had to go to his room but could come out whenever he felt like he could be around everyone without touching himself - and he had to wash his hands before re-joining the family. Other than that, I ignored it, and he has pretty much stopped (at least that Im aware of). Like everything else, it's s stage.... and will eventually pass.