Fix a problem in counting login statistics.