test added to check if the user already exists before creating a new one
callback renamed
execute callbacks only if they're defined
misc bugs fixed
UT added
Merge branch 'tests'