[CORD-989] Login errors

Change-Id: I781f3535110664d4b1de2659f6995102949ffb8c
diff --git a/src/app/core/login/login.html b/src/app/core/login/login.html
index 4fa78dc..12755ab 100644
--- a/src/app/core/login/login.html
+++ b/src/app/core/login/login.html
@@ -32,6 +32,7 @@
             <input type="password" ng-model="password" title="Please enter your password" placeholder="******" required="" value="" name="password" id="password" class="form-control">
             <!--<span class="help-block small">Your strong password</span>-->
           </div>
+          <xos-alert config="{type: 'danger'}" show="vm.showErrorMsg">{{vm.errorMsg}}</xos-alert>
           <div>
             <button ng-click="vm.login(username, password)" class="btn btn-accent">Login</button>
             <!--<a class="btn btn-default" href="register.html">Register</a>-->
diff --git a/src/app/core/login/login.ts b/src/app/core/login/login.ts
index 183980a..558fe37 100644
--- a/src/app/core/login/login.ts
+++ b/src/app/core/login/login.ts
@@ -8,7 +8,8 @@
   static $inject = ['$log', 'AuthService', '$state', 'XosModelDiscoverer', 'StyleConfig'];
   public loginStyle: any;
   public img: string;
-
+  public showErrorMsg: boolean = false;
+  public errorMsg: string;
   constructor(
     private $log: ng.ILogService,
     private authService: AuthService,
@@ -34,6 +35,7 @@
       password: password
     })
       .then(res => {
+        this.showErrorMsg = false;
         // after login set up models
         return this.XosModelDiscoverer.discover();
       })
@@ -41,7 +43,9 @@
         this.$state.go('xos.dashboard');
       })
       .catch(e => {
-        this.$log.error(e);
+        this.$log.error(`[XosLogin] Error during login.`);
+        this.errorMsg = `Something went wrong, please try again.`;
+        this.showErrorMsg = true;
       });
   }