Feature - abstract login

- abstracts login in so that new services are added easily
- create utils files for commonly used functions
- fixes the case where user revokes access to the app
- fixes get capacity