Added tests for token refreshing