refresh-token support (pass 1)

Added this manually to avoid a big merge hastle.
merged Don and Johns enhancements to token enhancer to manage different token requests