Fix infinitely signin or signout