Use passwordTest function in authentication