Checking password reset properly

This will fix the infinite redirect loop bug when submitting the reset password form.