Dim users As List = DBM.SQLSelect(SQL, "SELECT * FROM users WHERE UserLogin='" & logininp1.text & "' AND UserPassword='" & logininp2.Text & "'")
If users.Size > 0 Then
Dim user As Map = users.Get(0)
Page.ws.Session.SetAttribute("authType", "local")
Page.ws.Session.SetAttribute("authName", logininp1)
Page.ws.Session.SetAttribute("IsAuthorized", "true")
Page.ws.Session.SetAttribute("UserType", "" & user.Get("usertype") ) ' lowercase!
Page.ws.Session.SetAttribute("UserID", "" & user.Get("userid") ) ' lowercase!
Page.ws.Session.SetAttribute("UserRows", user.Get("userrows") ) ' lowercase!
Page.ws.Session.SetAttribute("Username", user.Get("userlogin") ) ' lowercase!
else
log("user not found")
end if