CrazyLogin: fixed NPE in metrics code when database is not accessible
CrazyLogin: some method cleanup