added disconnect method to client and server