fixed error handling when creating new user