Long polling

This PR replaces the websockets communications by long polling.

Trello card: https://trello.com/c/pWqVMMVf

I suggest @Standard8 and/or @n1k0 to review this.