summary refs log tree commit diff
path: root/webclient/login
diff options
context:
space:
mode:
Diffstat (limited to 'webclient/login')
-rw-r--r--webclient/login/login-controller.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/webclient/login/login-controller.js b/webclient/login/login-controller.js
index c519f7698c..015868b0b9 100644
--- a/webclient/login/login-controller.js
+++ b/webclient/login/login-controller.js
@@ -68,7 +68,7 @@ angular.module('LoginController', ['matrixService'])
         // try to login
         matrixService.login($scope.account.user_id, $scope.account.password).then(
             function(response) {
-                if ("access_token" in response) {
+                if ("access_token" in response.data) {
                     $scope.feedback = "Login successful.";
                     matrixService.setConfig({
                         homeserver: $scope.account.homeserver,
@@ -79,7 +79,7 @@ angular.module('LoginController', ['matrixService'])
                     $location.path("rooms");
                 }
                 else {
-                    $scope.feedback = "Failed to login: " + JSON.stringify(response);
+                    $scope.feedback = "Failed to login: " + JSON.stringify(response.data);
                 }
             },
             function(error) {