move modals to separate template
better checking for hostnames