Security fixes and first implementation of addUser with adding a temporary pre user