Second wife rights

I have married a girl 9 years back, within a year i had got relation with other girl. Second girl got pregnant and gave birth to a baby girl in 2011. My wife gave birth to a baby boy in 2014. Second girl knows about the wife from the begining. But my wife came to about that girl after her delivery. Lots of issues and quarrels happend. Even though as on date i am staying with both of them in different places. I mean to say that i am in relation with both of them. Problem is that second girl wants some rights and respect in society. She doeznt wants any property or any shares. As becoz she is living with a baby girl in society, everybody in society looks them like keep. That too in a cheap manner. So is there any chances of getting legal entity to our relationship. We both came to know our mistakes what we have done. Due to my wrong decision our daughter is facing problems in the society and even my second wife facing lot of problems in the society by living lonely. Mistake is mine . I have spoiled their lives. Can our judicial system give them some rights where they can live boldy with respect. I hope you have understood my problem Pls suggest.