Rewrote most of the beeminder api

Implemented local storage for goals and tokens