diff --git a/src/main/java/LoginGUI.java b/src/main/java/LoginGUI.java index 675ffa5..6672019 100644 --- a/src/main/java/LoginGUI.java +++ b/src/main/java/LoginGUI.java @@ -51,6 +51,10 @@ public class LoginGUI extends JFrame implements ActionListener { public void actionPerformed(ActionEvent e) { boolean stayLoggedIn = stayLoggedInCheckbox.isSelected(); String username = usernameField.getText(); + // Set stayLoggedIn to false if the checkbox is unchecked + if (!stayLoggedInCheckbox.isSelected()) { + stayLoggedIn = false; + } updateStayLoggedIn(username, stayLoggedIn); } }); diff --git a/user.json b/user.json index 5437c96..2dcd5ea 100644 --- a/user.json +++ b/user.json @@ -18,6 +18,6 @@ "userName": "Test User", "password": "Test", "birthday": "01.01.2000", - "stayLoggedIn": true + "stayLoggedIn": false } ] \ No newline at end of file