I am trying to implement a use case where users can request to check his password by providing username. Issue: Node js back-end app returns result before query is complete.