self.configure = function (config) {
        self.configuration = config;

        if (config.username && config.password) {
            var protocol = config.url.match(/(^|\s)(https?:\/\/)/i);