Fixes incorrect renew references
Adds a bunch of tests for the full token workflow