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



        // Gets all users on tasks using a new thread. 
        // This task alone is around 20 seconds



        // A new thread continously updates the login interface
        final Thread t = new Thread(new Runnable() {
            @Override
            public void run() {

                //updateProgressView();

                // Validate connection to system database
                validateSystemDBConnection();

                // Validate connection to user database
                validateUserDBConnection();

                // Validate connection to customer database
                validateCustomerDBConnection();

                // Validate connection to file database
                validateFileDBConnection();

                // Checking login credentials
                User user = validateUser();

                if (user != null) {
                    // Fetches the remaining data from the server
                    initiateController();

                    // Login
                    login(user);
                }

            }
        });
        t.start();

        updateProgressView();
    }//GEN-LAST:event_buttonLoginActionPerformed