In order to encourage and facilitate the construction or rehabilitation of housing to meet the needs of displaced persons who are displaced from dwellings because of any Federal or Federal financially assisted project, the head of the Federal agency administering such project is authorized to make loans as a part of the cost of any such project, or to approve loans as a part of the cost of any such project receiving Federal financial assistance, to nonprofit, limited dividend, or cooperative organizations or to public bodies, for necessary and reasonable expenses, prior to construction, for planning and obtaining federally insured mortgage financing for the rehabilitation or construction of housing for such displaced persons. Notwithstanding the preceding sentence, or any other law, such loans shall be available for not to exceed 80 per centum of the reasonable costs expected to be incurred in planning, and in obtaining financing for, such housing, prior to the availability of such financing, including, but not limited to, preliminary surveys and analyses of market needs, preliminary site engineering, preliminary architectural fees, site acquisition, application and mortgage commitment fees, and construction loan fees and discounts. Loans to an organization established for profit shall bear interest at a market rate established by the head of such Federal agency. All other loans shall be without interest. Such Federal agency head shall require repayment of loans made under this section, under such terms and conditions as he may require, upon completion of the project or sooner, and except in the case of a loan to an organization established for profit, may cancel any part or all of a loan if he determines that a permanent loan to finance the rehabilitation or the construction of such housing cannot be obtained in an amount adequate for repayment of such loan. Upon repayment of any such loan, the Federal share of the sum repaid shall be credited to the account from which such loan was made, unless the Secretary of the Treasury determines that such account is no longer in existence, in which case such sum shall be returned to the Treasury and credited to miscellaneous receipts.