Code to add and edit users