The commissioner may, in the name of the state, enter into contracts for loans to an authority or a municipality for one or more projects, though a project has received or will receive aid from any other source, except the federal government. All such contracts shall be subject to approval by the state comptroller, and by the attorney-general as to form. Any such loan shall be in such amount as the commissioner, in his discretion, may deem necessary to insure the completion, availability for lawful occupancy and use of the project. No loan shall be made in an amount greater than the project cost, plus working capital in an amount not to exceed two per centum of the project cost or one hundred thousand dollars, whichever is less, nor until the municipal comptroller and local legislative body have attached their separate approvals to the loan contract. The commissioner may make temporary loans or advances to a housing authority in anticipation of such loan and no such temporary loan or advance shall be deemed to constitute part of such loan unless such temporary loan or advance has been made out of the proceeds of definitive housing bonds sold by the state pursuant to section sixty of the state finance law.