wixUsersBackend does not work

Tried to pull isloggedIn user status from the backend but it always returns as false even though I am logged in. Please what could be the issue?

import wixUsersBackend from 'wix-users-backend';

let user = wixUsersBackend.currentUser;
let userId = user.id;
let isLoggedIn = user.loggedIn;

wixUsersBackend has been deprecated and replaced with wix-Members-backend.currentMember,
As it returns a promise you’ll need to handle that as well.

import { currentMember } from 'wix-members-backend'

  return currentMember.getMember(options)
    .then((member) => {
     	let isLoggedIn = true;
        	let userId = member._id; 
      }
    })
    .catch((error) => {
      return (error);
    })

Hope it helps.

@doug-antill thanks for the response, I tried using members before but didn’t work and asked the question here https://www.wix.com/velo/forum/coding-with-velo/how-to-get-loggedin-member-information-from-the-backend

@doug-antill is it possible for a user that is not on the site to do a GET request that will return if the user is logged in or not or does the session log prevent that?