Any person who has a mortgage lien upon any land against which there exists a prior mortgage may pay any interest or any installment of the principal or interest which may be in default upon any such prior mortgage and all such sums so paid shall become a part of the debt secured by such junior mortgage, shall bear interest from date of payment at the same rate as the indebtedness secured by such prior mortgage and shall be collectible with, as a part of and in the same manner, as the amount secured by such junior mortgage.
765 ILCS 905/13