update function refreshUser