Core/LoginDB: change sql query to avoid the error of not finding the db (occured on many debian systems)