Any municipality may purchase or legally invest in any of the bonds of a housing authority and exercise all of the rights of any holder of such bonds.