Check that the login URL is a HTTP/HTTPS one

I tried entering random data and it crashed, so a check wouldn't hurt.
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
Merge pull request #3 from vuntz/valid-url

Check that the login URL is a HTTP/HTTPS one