fix auto-refresh mechanism after authenticated problem