[WIP] Token identification

First cut at this, any thoughts?
This filter is also in `ApplicationController`