Moved password hash exception handling
Added Unit test for PasswordHash