support no valid pwd
on_query (not done)
WIP