handle connect errors
generate session key each time. support multi-tab coexist
fix disconnectSync(), call it in onError