properly refresh using result of XHR on success
add the proper behaviour for when no refresh attributes are provided