Infinite redirection of browser to callback when rules are executed

I have 2 rules:
a) Unverified users cannot login
b) Users from only a particular domain can sign up (this is not being followed, signup is allowed, only logins get banned)

Whenever any of these rules are executed, the browser goes into infinite redirection mode to the callback url with “access denied”. I have a SPA setup in reactjs. When there are no rules, the application works fine. What can I do to resolve this ?

I am not very familiar with reactjs, this is the first time I am using it for my frontend.