You are using global variable logUser in two different ways:
In one place you treat it like a single user name
In another place you treat it like a list of all the user names.
Likewise with the password(s).
Spend a byte or two, they're cheap.
See HOW TO WORK WITH LISTS in this FAQ
Also, make some more global variables, with names reflecting their function, like
NameToPasswordMap, a two column table with name in column 1 and password in column 2,
for use with the list block LOOKUP IN PAIRS.
Also, if you keep a list in TinyDB, never use blank as a default
if not found. Use CREATE EMPTY LIST instead as a default.
ABG