private static void performLogin(final JFrame frame, final JTextField user, final JPasswordField pass, final JCheckBox rememberMe) {
        final VBLogin login = new VBLogin(user.getText().replaceAll(" ", "%20"), new String(pass.getPassword()));
        if (login.login()) {
            if (rememberMe.isSelected()) {
                try {
                    final File file = new File(Configuration.STORAGE_DIR + File.separator + "Account.txt");
                    if (!file.exists()) {
                        file.createNewFile();
                    }
                    final BufferedWriter bw = new BufferedWriter(new FileWriter(file));
                    bw.write(login.getUsername());
                    bw.close();
                } catch (IOException e1) {
                    e1.printStackTrace();
                }
            }
            self = login;
            frame.setVisible(false);
        } else {
            frame.setTitle("Invalid");
        }
    }