check that login URL has a valid hostname

otherwise things like http:///foo/nuova can cause an ugly error