Moved back to ng1

Change-Id: I43b284e3b3cb3ac19d43c088de988c89a7ea8807
diff --git a/src/app/core/login/login.ts b/src/app/core/login/login.ts
new file mode 100644
index 0000000..af46619
--- /dev/null
+++ b/src/app/core/login/login.ts
@@ -0,0 +1,30 @@
+import {AuthService} from '../../rest/auth.rest';
+
+class LoginCtrl {
+  static $inject = ['AuthService', '$state'];
+
+  /** @ngInject */
+  constructor(
+    private authService: AuthService,
+    private $state: angular.ui.IStateService
+  ) {
+  }
+
+  public login(username: string, password: string) {
+    this.authService.login({
+      username: username,
+      password: password
+    })
+      .then(res => {
+        console.log(res);
+        this.$state.go('app');
+      })
+      .catch(e => console.error);
+  }
+}
+
+export const xosLogin: angular.IComponentOptions = {
+  template: require('./login.html'),
+  controllerAs: 'vm',
+  controller: LoginCtrl
+};