Get or create token

Rewrite of #5