fixed case where responseText is not json obj
complete registration should work but isn't fully tested