Fixing crash bug in password threads.

Signed-off-by: FellowTraveler <F3llowTraveler@gmail.com>

So far haven't been able to reproduce thread crash since these fixes.