handle errors in user management