refactoring code

- setToken
- setHost