handle redirects to home page after login when referred is forgot password page