added support for a custom port as well as auth credentials