Added more tests and modified SuccessfulAuthenticationListener.

Parsing functions were moved to class methods of SuccessfulAuthenticationListener from the inner Hooks class.