use now register_shutdown_function instead of asynch plugin to prevent gapi calls from blocking page loading
solved an issue with cookie management
updated tests