The rights of the parties shall be settled by the judgment or decree of the court, and the proceeds divided in accordance therewith.