title: cloudfoundry - vmc register error with external uri
body: <p>I installed cloudfoundry with the -D option to change the default domain. Cloudfoundry installs fine and starts but when I try to vmc in I get an error:</p>
  
  <p><code>swampfox@swampcf:~$ vmc target api.mydomain.com</code>
  <code>Successfully targeted to [http://api.mydomain.com]</code></p>
  
  <p><code>swampfox@swampcf:~$ vmc register --email emailid@gmail.com --passwd mypass
  Creating New User: OK
  Attempting login to [http://api.mydomain.com]
  Problem with login to 'http://api.mydomain.com', target refused connection (getaddrinfo: Name or service not known), try again or register for an account.</code></p>
  
  <p><code>swampfox@swampcf:~$ vmc register --email emailid@gmail.com --passwd mypass
  Creating New User: Error 100: Bad request</code></p>
  
  <p>Can someone help. I need to have the external uri or this is useless for me.</p>
  
  <p>This works fine if I take the default api.vcap.me but it only works on that vm and is not accessable from other infrastructure which is pretty useless.</p>