#25 now able to register new users
fixed #25 adding error handling