Added support for port when adding clients to api server.