public boolean login(){
        // next ask for the username and password for the server
        log.write("Log in as? ");
        
        String temp = log.readLn();
        
        // Search text file to find entry with that username
        // then ask for password
        // if correct set username and permission values
        // at the moment it only checks against inbuilt username and password
        
        log.write(temp + "'s password: ");
        // flush the output
        log.flush();
        
        // mask the input
        String pass = log.readPassword();
        pass = pass.substring(0);
        
        log.flush();
        
        if ("root".equals(temp) && "toor".equals(pass)){
            username = "root";
            permissions = 0;
            pass = ""; // remove the password
            return true;
        } else {
            log.writeLn("\rThe password is incorrect.\n");
            return false;
        }
        
    }