rework the gettoken controller

Increase the code coverage for the gettoken controller.