Add disconnect button

I had to remove the synchronized close to prevent deadlock but side
effects are still unknown, has to been tested