some refinements with regards to token refreshing