check that login URL has a valid hostname

otherwise things like http:///foo/nuova can cause an ugly error
Merge pull request #1 from aspiers/valid-url

check that login URL has a valid hostname