How do I run an angularjs script to get a json token response?