Minor refactor tidy up TokenAuthenticationHandler

Fix circular dependency (!)
Minor fix harmless variables shadowing in dynamically defined methods

Remove forgotten hack related to the deprecated Cucumber scenarios