refactor to use key_name instead of username on UsersDb