add automatic token refreshing feature