automatically refreshes expired tokens; issue #49