disconnect method for js client