fix a bug with the condition when adding a user and when selcting the correct user
simplify SQL command construction
deleting user's local accounts when deleting a user
deleting local account on a deleted machine