Hi me again with another problem, Log in problems this time

Guys can I ask for help, this was supposed a login screen that lets me read the email, status and password in the spreadsheet but I can't and I don't know what i'm doing, can you guys help me



function doGet(e) {

  if (e.parameter.func == "Login") {

    var ss = SpreadsheetApp.openById(e.parameter.ID);

    var sh = ss.getSheetByName(e.parameter.SH);

    var msg = 'Nothing';

  var Email = e.parameter.email;

  var Password = e.parameter.password;

  var rg = sh.getName() + "!" + sh.getDataRange().getA1Notation();

  var sql = "Select A,B,C,D,E,F,G where A ="+" '"+ Email +"'";

  var qry = '=query(' + rg + ';\"' + sql + '\";0)';

  var ts = ss.insertSheet();

  var setQuery = ts.getRange(1,1).setFormula(qry);

  var getResult = ts.getDataRange().getValues();

    var getPWD = ts.getRange(1,7).getValue();

    var getFullName = ts.getRange(1,2).getValue();

     

      ss.deleteSheet(ts);

  if ( getPWD == Password ) {

        msg = getFullName;

  }

  else { 

       msg = 'ERPWD';

  }

    return ContentService.createTextOutput(msg);

  }

}

You do not say what your problem is?

Help others to help you by clearly indicating where things are going wrong, and what you expect to happen, showing your relevant blocks.

Also, you do not appear to be providing an option for a successful login?

image