Better handling of background polling threads, keeps only the latest launched worker. Still not perfect though, two requests are sent on startup if the session cookie is valid.