Implemented tests for editing a user account details

Rather large commit as I implemented two test cases and did some refactoring for allowing to edit and checking a user in an efficient way
personally I am very wary of non repeatable tests.  in the past I've put the build id into the local.conf and hashed that to seed the random number generator, but even that I minimised the use of it. I'd recommend either doing that or picking a specific one if it'd make sense.