added AJAX call for registration