Fix issue with url gen. when the host is localhost

The application was unable to generate proper URL scheme when the host name is localhost. This is fixed by not only checking for 127.0.0.1 but also for the host name localhost, and setting the URL scheme to HTTP.