@Override
    public void actionPerformed(ActionEvent e) {
      int option = showConfirmWarningMessage("Logout", "Are you sure you want to logout?");
      if (option == JOptionPane.YES_OPTION) {
        client.logout();
        conversationController.closeAllConversations();
        friendsPanel = null;
        loginPanel.setUsername("");
        loginPanel.setPassword("");
        mainWindow.setContentPane(loginPanel);
        mainWindow.setTitle(WINDOW_TITLE);
        mainWindow.revalidate();
        mainWindow.repaint();
      }
    }