Refactored API polling logic into the user model