I used to push the playpen to the toilet's front door when I need to go. So he can sees me and stop crying. When he's tall enough to climb out of the playpen. I used to put him in the high chair and push him anywhere that I have to be, like to the kitchen or toilet's front door. Put some toys in the high chair's tray to keep him busy. When both method didn't work, I let him watch Sesame Street/ Barney etc. children TV show to keep him busy, so I can cook or go to toilet. But best of all, try to reason with him, explain why mommy needs to go away for a while and if he needs mommy, mommy will always be there. The more I reason with my boy, he's now less "attach" me. He'll come to the kitchen /toilet just to check on me, than he'll go away playing his toy or watching children show. Hope these methods help!