             NSAttributedStringKey.foregroundColor: UIColor.white
         ]
         
-        updateStats()
+        displayProfileInfo()
+        displayStats()
+        fetchServerStats()
         
         profilePic.layer.borderColor = UIColor.white.cgColor
         profilePic.layer.borderWidth = 2.0

    }
    
    @objc func userProfileChanged(_ notification: NSNotification) {

        if SessionManager.shared.userIsLoggedIn() {
            // Fetch the user's call stats
            let userStatsOp = FetchUserStatsOperation()
            userStatsOp.completionBlock = {
                self.userStats = userStatsOp.userStats
                DispatchQueue.main.async {
                    self.updateStats()
                }
            }
            OperationQueue.main.addOperation(userStatsOp)
        } else {
            userStats = nil
            updateStats()
        }

        // Update the profile icon on the main thread
        DispatchQueue.main.async {
            let sessionManager = SessionManager.shared
            if let picUrl = sessionManager.userProfile?.picture {
                self.profilePic.kf.setImage(with: picUrl)
            } else {
                self.profilePic.image = UIImage(named: "profile")
            }
            if sessionManager.userIsLoggedIn() {
                self.userName.text = sessionManager.userProfile?.nickname
                self.email.text = sessionManager.userProfile?.email ?? sessionManager.userProfile?.name
                self.navSignInButton.title = R.string.localizable.signOut()
                self.profileContainer.isHidden = false
                self.signInContainer.isHidden = true
            } else {
                self.navSignInButton.title = R.string.localizable.signIn()
                self.profileContainer.isHidden = true
                self.signInContainer.isHidden = false
            }
        }
    }

        tableView.tableHeaderView = headerView
    }
    
    func displayStats() {
        viewModel = ImpactViewModel(logs: ContactLogs.load(), stats: userStats)
        let weeklyStreakCount = viewModel.weeklyStreakCount
        streakLabel.text = weeklyStreakMessage(for: weeklyStreakCount)
