Modify the Token model for better maintenance

Use default primary key, and set the name and key to unique
Change api root view to CBV