Use configuration for server urls

Rather than hardcoding localhost.