Add logs to enterForeground()/enterBackground() and let all accounts be refreshed when entering foreground.