improved behaviour of server when launched on GUI

Now closing the log window closes the server too.