Fix retrieve issue in user management page and add lib to support sql
output.