add ajax connection to poll the server for new posts