Fix i4374
save only first user privileges
fix some bugs
add drop privs to latch shell
fix bug