The court shall ascertain the amount due each lien creditor and shall direct the application of the proceeds of sale to be made to each in proportion to their several amounts, according to the provisions of this act, but the claims of all persons for labor as provided in Section 15 of this Act shall be first paid. If, upon making sale under this act of any or all premises, the proceeds of such sale shall not be sufficient to pay all claims of all parties, according to their rights, the judgment shall be credited by the amount of the sale and enforcement may proceed in favor of any creditor whose claims are not satisfied for the balance due as upon a deficiency judgment in the foreclosure of a mortgage and such deficiency judgment shall be a lien upon all real estate and other property of the party against whom it is entered to the same extent and under the same limitations as a judgment for the payment of money; and in case of excess of sales over the amount of the judgment, such excess be paid to the owner of the land, or to the person who may be entitled to the same, under the direction of the court.
770 ILCS 60/19