doLoginFail and MaxSessions exceptions control

doLoginFail and MaxSessions exceptions control and some debug options