Fix bug DNN-26717: use user info NULL check instead of Mode check because user may login directly even the user haven't register first.