# HELP PLEASE

**URL:** <https://forum.wixstudio.com/t/help-please/26267>\
**Category:** Ask the community\
**Tags:** wix-members-area, question, code\
**Created:** [January 4, 2018, 9:49pm UTC](https://forum.wixstudio.com/t/help-please/26267 "2018-01-04T21:49:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pawtalog](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/pawtalog/32/1245_2.png) [@pawtalog](https://forum.wixstudio.com/u/pawtalog)\
**Post date:** [January 4, 2018, 9:49pm UTC](https://forum.wixstudio.com/t/help-please/26267/1 "2018-01-04T21:49:03Z")

</div>

When I’m testing my site using different accounts, I can’t open up the profile page that I coded for my site members. Instead, this message pops up: “there’s nothing here… we can’t find the page you’re looking for. Check the URL, or head back home.” The profile pages were working perfectly up until now, and I really need to fix this.  
Here is a copy of my code, just in case you see anything wrong:

import wixUsers from ‘wix-users’;  
import wixData from ‘wix-data’;  
import wixLocation from ‘wix-location’;  
$w.onReady( () =\> {  
if(wixUsers.currentUser.loggedIn) {  
$w(“#button13”).label = “Logout”;  
$w(“#button12”).show();  
}  
else {  
$w(“#button13”).label = “Login”;  
$w(“#button12”).hide();  
}  
} );  
export function button13\_onclick() {  
// user is logged in  
if(wixUsers.currentUser.loggedIn) {  
// log the user out  
wixUsers.logout()  
.then( () =\> {  
// update buttons accordingly  
$w(“#button13”).label = “Login”;  
$w(“#button12”).hide();  
} );  
}  
// user is logged out  
else {  
let userId;  
let userEmail;  
// prompt the user to log in  
wixUsers.promptLogin( {“mode”: “login”} )  
.then( (user) =\> {  
userId = [user.id](http://user.id/) ;  
return user.getEmail();  
} )  
.then( (email) =\> {  
// check if there is an item for the user in the collection  
userEmail = email;  
return wixData.query(“Profile”)  
.eq(“\_id”, userId)  
.find();  
} )  
.then( (results) =\> {  
// if an item for the user is not found  
if (results.items.length === 0) {  
// create an item  
const toInsert = {  
“\_id”: userId,  
“email”: userEmail  
};  
// add the item to the collection  
wixData.insert(“Profile”, toInsert)  
.catch( (err) =\> {  
console.log(err);  
} );  
}  
// update buttons accordingly  
$w(“#button13”).label = “Logout”;  
$w(“#button12”).show();  
} )  
.catch( (err) =\> {  
console.log(err);  
} );  
}  
}  
export function button12\_onclick() {  
[wixLocation.to](http://wixlocation.to/) (`/Profile/Update/${ [wixUsers.currentUser.id](http://wixusers.currentuser.id/) }`);  
}  
Thanks in advance to anyone who helps out!
