updated to handle password reset