Hello I am solicitor with over 15 years experience. I will try to help you with this. In principle if the property is jointly owned then whoever's name the new mortgage is in will make no difference to the legal ownership of the property. If however you and your husband were in dispute over this property then issues like how much was contributed to he purchase price and how much equity was put in by each of you could become significant issues. There is no reason why you and your husband can not draw up an agreement as to who owns what share of the equity in this property.
I would strongly suggest that any such agreement is drawn up with the help of a solicitor so that it is legally effective, tax efficient and takes account of future events that you may not anticipate in advance.
Thanks so much for the answer! Would you know what type of an agreement is this (maybe it has a legal name) and if there is a specific type of solicitor we should use?
I don't think there is any specific name for this type of agreement but it is easily explained to a solicitor. In order to find an appropriate solicitor follow this link http://solicitors.lawsociety.org.uk/ and look for someoen in the "houses, property, neighbours" category in your area. There will then be a list of firms practising in the relevant area in your locality.
Thanks a lot!