add token security for aql save backwards compatibility