public void actionPerformed(ActionEvent e) {
		
		//perform login function if users clicks logins
		if (e.getSource() == btnLogin) {
			String user = txtUsername.getText();
			char[] pass = password.getPassword();
			String p = new String(pass);
			int i = 0;
			logininfo.setInfo(user, p);
			username = user;
			try {
				i = logininfo.getInfo();
			} catch (IOException e1) {
				e1.printStackTrace();
			}
			
			//validates if info user entered is correct
			if (i == 0)
				JOptionPane.showMessageDialog(null, "USERNAME NOT FOUND",
						"ERROR", JOptionPane.ERROR_MESSAGE);
			if (i == 1) {
				menu menu = new menu();
				menu.setVisible(true);
				dispose();
			}
			if (i == 2)
				JOptionPane.showMessageDialog(null, "PASSWORD INCORRECT",
						"ERROR", JOptionPane.ERROR_MESSAGE);
		}
		
		//performs new user function if user clicks on new user
		if (e.getSource() == btnNewUser) {
			
			//pops up a menu for user to put info
			JPanel newpanel = new JPanel();
			JTextField newuser = new JTextField(10);
			JPasswordField newpass = new JPasswordField(10);
			JPasswordField newpass1 = new JPasswordField(10);
			JLabel usernameLbl = new JLabel("Username:");
			JLabel passwordLbl = new JLabel("Password:");
			JLabel password1Lbl = new JLabel("Confirm Password:");

			newpanel.add(usernameLbl);
			newpanel.add(newuser);
			newpanel.add(passwordLbl);
			newpanel.add(newpass);
			newpanel.add(password1Lbl);
			newpanel.add(newpass1);

			int result = JOptionPane.showConfirmDialog(null, newpanel,
					"Make a new Account", JOptionPane.OK_CANCEL_OPTION);

			if (result == JOptionPane.OK_OPTION) {
				char[] pass = newpass.getPassword();
				char[] pass1 = newpass1.getPassword();

				String p = String.valueOf(pass);
				String p1 = String.valueOf(pass1);

				try {
					if (p.equals(p1)) {
						//writes login info
						logininfo.writeInfo(newuser.getText(), p);
					} else {
						//show error message if the two passwords dont match
						JOptionPane.showMessageDialog(null,
								"PASSWORDS DONT MATCH", "ERROR",
								JOptionPane.ERROR_MESSAGE);
					}
				} catch (IOException e1) {
					// TODO Auto-generated catch block
					e1.printStackTrace();
				}

			}
		}
	}