private JPanel createPanel() {
        //Create and populate the panel.
        panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));

        JPanel containerUsername = new JPanel(new FlowLayout());
        JLabel labelUsername = new JLabel("Username", JLabel.TRAILING);
        containerUsername.add(labelUsername);
        textFieldUsername = new JTextField(10);
        labelUsername.setLabelFor(textFieldUsername);
        containerUsername.add(textFieldUsername);
        panel.add(containerUsername);

        JPanel containerPassword = new JPanel(new FlowLayout());
        JLabel labelPassword = new JLabel("Password", JLabel.TRAILING);
        containerPassword.add(labelPassword);
        final JPasswordField textFieldPassword = new JPasswordField(10);
        labelPassword.setLabelFor(textFieldPassword);
        containerPassword.add(textFieldPassword);
        panel.add(containerPassword);

        statutLabel = new JLabel("");
        panel.add(statutLabel);

        JPanel containerButtons = new JPanel(new FlowLayout());
        JButton okButton = new JButton("Connect");
        okButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {

                if(!textFieldUsername.getText().isEmpty() && !String.valueOf(textFieldPassword.getPassword()).isEmpty()) {
                    //Connect WS game_login
                    java.util.List<GameToSelect> gamesToSelect = new ArrayList<GameToSelect>();
                    try {
                        String xml_login = WebRequester.sendAuthentificationRequest(urlToLogin, textFieldUsername.getText(), String.valueOf(textFieldPassword.getPassword()));
                        gamesToSelect = getGameToSelect(xml_login);
                        statutLabel.setText("");
                        LoginWindow.this.repaint();
                    } catch (Exception e1) {
                        statutLabel.setText("Error on login");
                        LoginWindow.this.repaint();
                        e1.printStackTrace();
                    }

                    if(!gamesToSelect.isEmpty()) {
                        createGameSelector(gamesToSelect);
                        statutLabel.setText("");
                        LoginWindow.this.repaint();
                    } else {
                        statutLabel.setText("No game found");
                        LoginWindow.this.repaint();
                    }
                }
            }
        });
        containerButtons.add(okButton);
        JButton cancelButton = new JButton("Cancel");
        cancelButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                System.exit(0);
            }
        });
        containerButtons.add(cancelButton);
        panel.add(containerButtons);

        panel.setOpaque(true);
        return panel;
    }