close connection with server