within tries of reading a database
Added if-query to catch the empty password problem