Fixed the null pointer issue when log loginLog