Why does this log in system not work?

from replit import db
"                \033[32m MokeBeast Terminal                 "
print("\033[00m1: Log In")
print("2: Sighn Up")
mainMen = input(" ")
if mainMen == "1":
  loginName = input("Enter your username.")
  loginPassword = input("Ehter your password.")
elif mainMen =="2":
  newName = input("Create a new username.")
  newPass = input("Create a new password.")
  newUser = db[newName] = newPass
person = "bad"
if loginName in db.keys() and loginPassword in db.keys():
  person = "logged in"
if person == "logged in":
  print("test good")
  print("test bad")```
This turns out bad test. How can i fix it?

You haven’t added the password to the keys:

if loginName in db.keys() and loginPassword == db[loginName]: