ok i have ado querys and in design and i use this
webmodule.adologin.SQL.Text:='Select codentidade, nome, nipc, web_passwd from entidades where codentidade='''+AUserName+''' and web_passwd='''+APassword+'''';
webmodule.adologin.SQL.open;

dont have nothing more in my query....
in my client im using this ....

var rest:tcustomer;

begin
try
result := (httprio as iwebserver).login(edit1.text, edit2.text);
except
on e:exception do
showmessage(E.message);
end;
end;