input: Write a python function to check user login credentials using hashed passwords.
  assert login('user1', 'password123') == True
  assert login('user2', 'wrongpassword') == False
  assert login('nonexistentuser', 'password123') == False
output: import hashlib
  
  # Mock database of users and their hashed passwords
  users_db = {
      'user1': hashlib.sha256('password123'.encode()).hexdigest(),
      'user2': hashlib.sha256('mypassword'.encode()).hexdigest(),
  }
  
  def login(username, password):
      hashed_password = hashlib.sha256(password.encode()).hexdigest()
      return users_db.get(username) == hashed_password