Custom signup form not inserting to a custom table after sign up

I have a custom sign up form to insert welcome points to a table “MemberPoints”
The user is registered and logged in but the record is not being inserted to the database.
Can you please help figure out the issue.
Here is the code on the custom sign up form

$w.onReady(function () {
    $w('#registrationForm').onWixFormSubmitted((fields) => {
        console.log("Get current user");
     let MemberId = wixUsers.currentUser.id;
    console.log("User D " + MemberId);
     let MemberPoints = {
         "pointsRemaining":WelcomePoints,
         "creditDebit":WelcomePoints,
         "reason":"Welcome Points",
         "member":MemberId
        };
      //insert to member points
       console.log("Insert to Points");
      wixData.insert("MemberPoints", MemberPoints, TableAuthOptions)
        .then ((results) =>{
            console.log ("Insert complete");
            console.log("Current user ID " + MemberId);
            console.log("relocating to addresses");
            wixLocation.to("/account/my-account");
        })
        .catch(err => {
            console.log("Error " + err);
        })
     })

The record is not inserted to the MemberPoints table.
Here is the log

TableAuthOptions cannot be used on the front-end.
If you want to set special permissions for this insert, you should create a jsw file on your backend, and import the module to the front.

Something like:

//front end:
import {insertMemeberPoints} from 'backend/member-points.jsw';
$w('#registrationForm').onWixFormSubmitted((fields) => {
        console.log("Get current user");
     let MemberId = wixUsers.currentUser.id;
    console.log("User D " + MemberId);
     let MemberPoints = {
         "pointsRemaining":WelcomePoints,
         "creditDebit":WelcomePoints,
         "reason":"Welcome Points",
         "member":MemberId
        };
      //insert to member points
       console.log("Insert to Points");
	insertMemeberPoints("MemberPoints", MemberPoints)
        .then ((results) =>{
            console.log ("Insert complete");
            console.log("Current user ID " + MemberId);
            console.log("relocating to addresses");
            wixLocation.to("/account/my-account");
        })
        .catch(err => {
            console.log("Error " + err);
        })
     })

and:

//backend/member-points.jsw:
const TableAuthOptions = {/*put the permissions here*/};
export function insertMemeberPoints(collection, data){
return wixData.insert(collection, data, TableAuthOptions)
.then(r => r).catch(err => err);
}

Thanks you so much J.D it is inserting the record to MemberPoints table.
But, the account page is not displayed. It is showing the member only page that the new user was trying to access.

Basically, I want the user to enter the Address (Street and city ) . This is mandatory for my site. Since I could not find any way to do add it as custom fields I used this workaround to move focus to the address profile page after sign up.

import {AddWelcomePoints} from 'backend/Points';
import wixLocation from 'wix-location'; 

$w.onReady(function () {
    $w('#registrationForm').onWixFormSubmitted((fields) => {
        console.log("Get current user");
 let MemberId = wixUsers.currentUser.id;
    console.log("User D " + MemberId);
 //insert to member points
    console.log("Insert to Points");
    AddWelcomePoints(MemberId)
        .then ((results) =>{
            console.log ("Insert complete");
            console.log("Current user ID " + MemberId);
            console.log("relocating to addresses");
            wixLocation.to("/account/my-account");
        });
    })

});

back end in points.jsw

const WelcomePoints = 200;
const  TableAuthOptions = {"suppressAuth": true};
import wixData from 'wix-data';

export function AddWelcomePoints(MemberID){
 let MemberPoints = {
 "pointsRemaining":WelcomePoints,
 "creditDebit":WelcomePoints,
 "reason":"Welcome Points",
 "member":MemberID
    };
//insert to member points
    console.log("Insert to Points");
 return wixData.insert("MemberPoints", MemberPoints,                     TableAuthOptions)
        .then ((results) =>{
            console.log ("Insert complete");
            return results;
        });
}