Divorce and custody of unborn child

I was married under sunni (shafi) muslim law last year. Presently i m pregnant. I had some complications in my pregnancy, in the beginning so i came to stay with my parents with my inlaws consent. The doctor had told me to take complete rest. Due to ill health i continued this stay to 1 month with husbands consent. But my mother in law was not happy and made my husband against me by filling his ears with negative things about me. My husband dint support me at all. They called my parents and complained about me, creating a stressful situation for me. The complaints about me included mostly false things. They dint care that the stress can cause miscarraige. Me and my parents decided that there is no love or respect for me in that house. So we decided not to go back and are contemplating divorce. My questions are the following:- 1) Is the baby's father name required in the birth certificate? 2) If we dont include the fathers name in baby's birth certificate, will he have custody rights? Note: I want sole custody of my child. 3) Should i file for divorce before the birth of my child or after so that the father doesnt have right over my child.