replaced deprecated password encoder