setting credential to nil when new url is set