Preventing to visit the login page if the user is logged in
Change-Id: I7e3fe159300e4a29b3b9f5203b3bc6438a40148c
diff --git a/src/app/core/login/login.ts b/src/app/core/login/login.ts
index c091e43..ac0da82 100644
--- a/src/app/core/login/login.ts
+++ b/src/app/core/login/login.ts
@@ -13,6 +13,11 @@
private $state: angular.ui.IStateService,
private ModelSetup: IXosModelSetupService
) {
+
+ if (this.authService.isAuthenticated()) {
+ this.$state.go('xos.dashboard');
+ }
+
this.img = this.getImg(StyleConfig.background);
this.loginStyle = {