Fix for redirect loop following password reset