Fixed a bug
add example for using session and setting permission for accessing engine API