added ajax call to insert registration id on successful registration