add long polling
fix js client