Reimplement password playerstate solution

I didn't find any bugs per se, but Kaiser noted that it was possible
that some variables weren't being properly initialized. Better write a
safe function than figure out the hard way when something blows up.