Added hash password helper function