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