Refactors polling and disables it after the first attempt when not logged in.