security features done, bugs fixed

Signed-off-by: songyang <waoywssy@gmail.com>