diff --git a/src/frontend/app/login/login.component.ts b/src/frontend/app/login/login.component.ts
index 33179fe3dff4617faeada5ef472f41742701b14f..4970b0efaeb80b142725b3b86e9216d419e0cbc7 100644
--- a/src/frontend/app/login/login.component.ts
+++ b/src/frontend/app/login/login.component.ts
@@ -77,17 +77,6 @@ export class LoginComponent implements OnInit {
             tap((data: any) => {
                 this.authService.saveTokens(data.headers.get('Token'), data.headers.get('Refresh-Token'));
                 this.authService.setUser({});
-                if (this.authService.changeKey) {
-                    this.dialog.open(AlertComponent, {
-                        panelClass: 'maarch-modal',
-                        autoFocus: false,
-                        disableClose: true,
-                        data: {
-                            mode: 'danger',
-                            title: this.lang.warnPrivateKeyTitle,
-                            msg: this.lang.warnPrivateKey
-                        } });
-                }
                 if (this.authService.getCachedUrl()) {
                     this.router.navigateByUrl(this.authService.getCachedUrl());
                     this.authService.cleanCachedUrl();
@@ -121,6 +110,18 @@ export class LoginComponent implements OnInit {
                 this.authService.changeKey = data.changeKey;
                 this.applicationName = data.applicationName;
                 this.loginMessage = data.loginMessage;
+
+                if (this.authService.changeKey) {
+                    this.dialog.open(AlertComponent, {
+                        panelClass: 'maarch-modal',
+                        autoFocus: false,
+                        disableClose: true,
+                        data: {
+                            mode: 'danger',
+                            title: this.lang.warnPrivateKeyTitle,
+                            msg: this.lang.warnPrivateKey
+                        } });
+                }
             }),
             finalize(() => this.showForm = true),
             catchError((err: any) => {