** Added logging in for tests
** Added possibility for some clientapps to get token without authcode.