Add long-polling to frontend.