Moved the logging (on hook_boot) to the test module.
Fixed including the class OAuth2\Client.
Validity of 'state' is checked automatically by saving it in session and using it later for redirection. There is no need to check it explicitly.