Fix error in password reset and logout