Implements methods so the client can connect to the server