Get or create token

Rewrite of #5 
Should it be renamed `check_credentials` or `clean_credentials`?