handling success/failure callbacks for registration