Fix login-required undefined problem.