Fix NPE with undefined loginGraceRemaining attribute