Refactored to use verifyError and sendInvalidRequest methods
Check /register response is a JSON object
Merge remote-tracking branch 'origin/develop' into develop
Minor refactoring of test code