authentication to server and input port from arg