<button mat-icon-button [matMenuTriggerFor]="isUserLoggedIn() ? menu : menu2">
  <mat-icon>more_vert</mat-icon>
</button>
<!-- User logged in -->
<mat-menu #menu="matMenu">
  <button mat-menu-item (click)="navigateToProfileOrScoreboard()">
    <mat-icon>{{ isOnScoreTable() ? 'account_circle' : 'scoreboard' }}</mat-icon>
    <span>{{ isOnScoreTable() ? 'Mein Profil' : 'Scoreboard'}}</span>
  </button>
  <button mat-menu-item (click)="logout()">
    <mat-icon>logout</mat-icon>
    <span>Logout</span>
  </button>
</mat-menu>
<!-- User not logged in -->
<mat-menu #menu2="matMenu">
  <button mat-menu-item (click)="login()">
    <mat-icon>login</mat-icon>
    <span>Login</span>
  </button>
</mat-menu>
