#9: add validate logic for register user
#9: add register test case
add error handling classes