It would seem to me that, in the absence of any deed or written agreement to the contrary, when your fil paid off the mortgage on your martial home he gave this sum of money as an outright gift without condition to both you and your h and you are therefore entitled to your fair share when the house is sold.
You didn't earn the money other than by virtue of being his son's wife but neither did you h earn the money other than by being your fil's son. This being the case, there is no moral issue that prohibits you from sharing in the proceeds of sale of the marital home and, furthermore, any such sale will leave you in the position of having to provide a roof over the head of your fil's dgc.
To my mind, any moral issue rests with the giver who, it would seem, is belatedly attempting to attach strings to what was given freely. If it was your fil's intention to exclude you from his largesse should his sons marriage come to an untimely end, he was at liberty to dictate terms impose legally binding conditions before he put his hand in his wallet.
With regard to the loan, I take it that by 'unsecured' you mean that, in event of default, the loan company cannot force the sale of the marital home in order to recover the debt?
As it is in joint names you will need to scrutinise the small print to see what liability either of you have to pay any outstanding amount in full should one of you default.
In the normal course of events, I would expect a debt counsellor to be able to negotiate a substantial reduction in the amount of interest that has accrued and a reapportionate of the original sum advanced plus agreed interest to date which may require separate agreements for repayment to be drawn up in each of your names .
Before entering into any mediation process, I would strongly suggest that you source a solicitor who specialises in divorce and family law and who offers a free intial half an hour consultation.