Fix issue with /api/login calls being replayed in AngularJS controller

closes #13
Now passing the correct config to the api/login call