public static void create(final boolean log) {
        if (!log) {
            final VBLogin login = new VBLogin("", "");
            login.usergroupId = 0;
            login.userId = 0;
            login.logged = true;
            self = login;
        }
        if (self != null) {
            return;
        }
        final JFrame frame = new JFrame();
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        frame.setTitle("Login");
        frame.setSize(250, 175);
//        frame.setIconImage(new ImageIcon(VBLogin.class.getResource("/resources/icon_32w.png")).getImage());
        final Container container = frame.getContentPane();
        final JPanel bottom = new JPanel();
        final JPanel center = new JPanel();
        center.setLayout(new GridLayout(4, 1));
        bottom.setLayout(new GridLayout(1, 2));
        container.setLayout(new BoxLayout(container, BoxLayout.Y_AXIS));
        final JLabel userLabel = new JLabel("Username");
        center.add(userLabel, BorderLayout.CENTER);
        userLabel.setBounds(85, 10, 80, 20);
        final JTextField user = new JTextField();
        center.add(user, BorderLayout.CENTER);
        user.setBounds(63, 35, 120, 20);
        final JLabel passLabel = new JLabel("Password");
        center.add(passLabel, BorderLayout.CENTER);
        passLabel.setBounds(86, 60, 80, 20);
        final JPasswordField pass = new JPasswordField();
        center.add(pass, BorderLayout.CENTER);
        pass.setBounds(63, 85, 120, 20);
        final JCheckBox rememberMe = new JCheckBox("Remember Me");
        final File account = new File(Configuration.STORAGE_DIR + File.separator + "Account.txt");
        if (account.exists()) {
            try {
                final BufferedReader br = new BufferedReader(new FileReader(account));
                String content = "";
                String line;
                while ((line = br.readLine()) != null) {
                    content += line;
                }
                br.close();
                content = content.replaceAll("\n", "");
                user.setText(content);
                pass.requestFocus();
                pass.requestFocusInWindow();
                rememberMe.setSelected(true);
            } catch (Throwable e1) {
                e1.printStackTrace();
            }
        }
        bottom.add(rememberMe, BorderLayout.CENTER);
        user.addKeyListener(new KeyAdapter() {
            public void keyTyped(final KeyEvent e) {
                if (e.getKeyChar() == KeyEvent.VK_ENTER) {
                    e.consume();
                    pass.requestFocus();
                    pass.requestFocusInWindow();
                }
            }
        });
        pass.addKeyListener(new KeyAdapter() {
            public void keyTyped(final KeyEvent e) {
                if (e.getKeyChar() == KeyEvent.VK_ENTER) {
                    e.consume();
                    performLogin(frame, user, pass, rememberMe);
                }
            }
        });
        final JButton login = new JButton("Login");
        bottom.add(login, BorderLayout.CENTER);
        container.add(center, BorderLayout.CENTER);
        container.add(bottom, BorderLayout.CENTER);
        login.setBounds(83, 115, 80, 20);
        login.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent e) {
                performLogin(frame, user, pass, rememberMe);
            }
        });
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.setAlwaysOnTop(true);
        frame.setVisible(true);
    }