adding callback on error
fixing incorrectly written variable
Merge pull request #45 from chid/crash-fix

add proper error handlers to the UserController class