fixed the logout issue, which caused by buffered auth user id (wsapi creates lots of cgilua objects bind with the file name)
fixed the example for lua5.2, do_script take the env from caller