Register functionality added

Optional fields are not set as well as sex