Said mayor and council shall have authority to establish and maintain such quarantine and other regulations as in their judgment may be necessary to prevent the introduction or spread of any and all contagious or infectious diseases in said city.