Fixed unit tests after refactoring the authentication. Added unit tests to the password reset functionality