connected Refresh button for token.
general refactoring