Minor refactoring of token and user services.