Updated the client setup/authentication

See detailed report in the tcpclient class. Just mirrored the changes made in the TCPClient.