Configurable port support

Added the ability to specify a port in the config, which is then used when connecting.