First API functions. Long Polling hanging the server