diff --git a/src/js/controller/login-existing.js b/src/js/controller/login-existing.js index 4fe0bd2..20858c6 100644 --- a/src/js/controller/login-existing.js +++ b/src/js/controller/login-existing.js @@ -47,8 +47,14 @@ define(function(require) { return; } - $location.path('/desktop'); - $scope.$apply(); + appController._auth.storeCredentials(function(err) { + if (err) { + return $scope.onError(err); + } + + $location.path('/desktop'); + $scope.$apply(); + }); } function handleError(err) {