private void botaoLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoLoginActionPerformed

        if (emailField.getText().isEmpty() || passwordField.getPassword() == null) {

            JOptionPane.showMessageDialog(this, "All fields are mandatory", "Error!", JOptionPane.ERROR_MESSAGE);
        } else if (!(app.existUser(emailField.getText()))) {

            JOptionPane.showMessageDialog(this, "User not found", "Error!", JOptionPane.ERROR_MESSAGE);
        } else if (!(app.passwordCorrect(emailField.getText(), String.valueOf(passwordField.getPassword())))) {

            JOptionPane.showMessageDialog(this, "Password is incorrect.", "Error!", JOptionPane.ERROR_MESSAGE);
        } else {

            logged = app.getUserWithEmail(emailField.getText());

            if (logged != null) {

                emailField.setText("");
                passwordField.setText("");

                //desaparece o painel de login
                lbFixoEmail.setVisible(false);
                lbFixoPassword.setVisible(false);
                botaoLogin.setVisible(false);
                botaoRegistar.setVisible(false);
                emailField.setVisible(false);
                passwordField.setVisible(false);

                app.openFOMusic();
                //ativar paineis
                playPanel.setVisible(true);
                imagemInicial.setVisible(false);
                //pnBaseInfo.removeAll();
                pnListaMusicas = new PnListaMusicas(this);
                pnListaMusicas.getjLabPListName1().setText("Number of musics: " + app.getMusicsList().size());
                pnBaseInfo.add(pnListaMusicas);

                pnColuna = new PnColuna(this);
                pnBaseColuna.add(pnColuna);
                pnPesquisa = new PnPesquisa(this);
                pnBaseLogin.add(pnPesquisa);

                //carregar a lista de musica
                //app.musicsList.clear();
                //painel tabela               
                pnTabelaMusica = new PnTabelaMusica(this, app.getMusicsList());
                pnBaseTabela.add(pnTabelaMusica);

                jBBackward.setEnabled(true);
                jBForward.setEnabled(true);
                jBStop.setEnabled(true);
                togglePlay.setEnabled(true);

                revalidate();
                repaint();
            }

        }
    }//GEN-LAST:event_botaoLoginActionPerformed