The state legislature may endow the municipalities with such powers and authority as may be necessary to enable them to function as institutions of self-government.