Improve generation of login URL.
Improve generation of login URL.

Hotfix for #379. Change how login URL is generated in automated test so
that tests will still pass in environments with custom LOGIN_URLs set
up.

pydata/conf_site,pydata/conf_site,pydata/conf_site