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
good spot! I'll have a read of that whole page if I get time