eliminate infinite loop bug from login intercept