# \[Solved\] Private Login Screen

**URL:** https://community.thunkable.com/t/solved-private-login-screen/476648
**Category:** Questions about Thunkable X
**Tags:** firebase, solved, beginner, login
**Created:** [February 21, 2020, 10:38am UTC](https://community.thunkable.com/t/solved-private-login-screen/476648 "2020-02-21T10:38:14Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![16josephsrgz](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/16josephsrgz/32/61177_2.png) [@16josephsrgz](https://community.thunkable.com/u/16josephsrgz)
#### Post date: [February 21, 2020, 10:38am UTC](https://community.thunkable.com/t/solved-private-login-screen/476648/1 "2020-02-21T10:38:14Z")

</div>

So I’m making an app (obviously), and I’m quite new to Thunkable. I have managed to set up a login page using firebase and that’s all working ok, but I want to have a screen that you can only access if you’re logged in, while also having it in the menu. That’s a bit complicated: basically, a page in the menu that if you’re not logged in, it sends you to the login page and if you are logged in, it lets you go through to the page. I had a go at it by myself, and couldn’t work it out and couldn’t find any tutorials online. Is it even possible?

---

<div class="post-metadata">

### Author: ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)
#### Post date: [February 21, 2020, 11:34am UTC](https://community.thunkable.com/t/solved-private-login-screen/476648/2 "2020-02-21T11:34:48Z")

</div>

Hi, @16josephsrgz! 👋  
Welcome to our Community. 🤝

* * *

Congratulations on your app! 🎉

This method might help you -

- Grab a `Local_Storage` component from the _component tree_ (in Designer area).

- In your Login screen, (when the whole process ends, and you navigate the user to `menu`) add this block -

- Next, In the menu screen, when _that_ button is clicked, check if the user is logged in, and only let in if he/she is.

* * *

Hope I helped you! 😺  
Good Luck! 🎉

Thanks! 😊

---

<div class="post-metadata">

### Author: ![16josephsrgz](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/16josephsrgz/32/61177_2.png) [@16josephsrgz](https://community.thunkable.com/u/16josephsrgz)
#### Post date: [February 21, 2020, 12:13pm UTC](https://community.thunkable.com/t/solved-private-login-screen/476648/3 "2020-02-21T12:13:38Z")

</div>

Thank you very much for your reply, and I tried it out, however for my menu I am using the Drawer Navigator tool and I’m not entirely sure if your method would work with that tool. Here is my code for the login (I did not come up with this, I copied it off [this tutorial](https://www.youtube.com/watch?v=khKY3ztLKMA&t=1224s)):

 ![Screenshot 2020-02-21 at 11.59.03](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/e/0efad1f083c77730b00eeb89ebab052d69671170.png) ![Screenshot 2020-02-21 at 11.59.31](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/f/ff413fd93269afb13de7aeb09f1a1aae08ef9be8.png) ![Screenshot 2020-02-21 at 11.59.18](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/f/df0fee301882c0fd8dc853c21d58538d7ca57908.png)

---

<div class="post-metadata">

### Author: ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)
#### Post date: [February 21, 2020, 2:01pm UTC](https://community.thunkable.com/t/solved-private-login-screen/476648/4 "2020-02-21T14:01:33Z")

</div>

Hi, @16josephsrgz! 👋

I see, you have stored the `userID` as value,

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/9/394bdae984c5a2e5b3358eeefae3ee25d063c13e.png)

Whereas I suggested to store `true` -

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/4/248853b0a0c35c9999b495c791d0ff80bc7e6e25.png)

So, try storing true, and then check it 👍

Thanks! 😊

---

<div class="post-metadata">

### Author: ![16josephsrgz](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/16josephsrgz/32/61177_2.png) [@16josephsrgz](https://community.thunkable.com/u/16josephsrgz)
#### Post date: [February 21, 2020, 3:30pm UTC](https://community.thunkable.com/t/solved-private-login-screen/476648/5 "2020-02-21T15:30:32Z")

</div>

This quick fix works very well, thank you! However another problem has arisen, when you arrive on the login page, and then login, for a split second you go to the private page, however then you get sent back to the login page.

 ![IMG_4984.PNG](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/0/90cd0e70a26478fee726f1eee57eeee027e29616.jpeg) ![IMG_4986.PNG](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/0/203acdb8190bdae29755632f2aef3f36c36cda00.jpeg) ![IMG_4985.PNG](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/6/968660d01c2432fa5b8f789ec0be906e8ee59cd0.jpeg)

---

<div class="post-metadata">

### Author: ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)
#### Post date: [February 21, 2020, 4:23pm UTC](https://community.thunkable.com/t/solved-private-login-screen/476648/6 "2020-02-21T16:23:48Z")

</div>

Hi, @16josephsrgz! 👋  
Glad to know that you have solved some part of your problem 👍

* * *

Can you please post your complete blocks of login screen?

Thanks! 😊

---

<div class="post-metadata">

### Author: ![16josephsrgz](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/16josephsrgz/32/61177_2.png) [@16josephsrgz](https://community.thunkable.com/u/16josephsrgz)
#### Post date: [February 21, 2020, 4:32pm UTC](https://community.thunkable.com/t/solved-private-login-screen/476648/7 "2020-02-21T16:32:45Z")

</div>

@kartik14 Here you go:

 ![Screenshot 2020-02-21 at 16.18.57](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/0/5034023d0733f20e852d723008007d55b479dc6a.png) ![Screenshot 2020-02-21 at 16.19.22](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/8/d85992c3ae078c81faf8392b326b00f473e424c9.png) ![Screenshot 2020-02-21 at 16.19.09](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/b/eb842b176ddbf2d945c42bd4cd8b1fd890e79c2b.png)  
And here are the blocks on the other page:  
 ![Screenshot 2020-02-21 at 16.20.45](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/9/5967449f94133fa102be1e717ecd230b8bc41456.png)

---

<div class="post-metadata">

### Author: ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)
#### Post date: [February 21, 2020, 4:54pm UTC](https://community.thunkable.com/t/solved-private-login-screen/476648/8 "2020-02-21T16:54:27Z")

</div>

![Screenshot 2020-02-21 at 16.20.45](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/9/5967449f94133fa102be1e717ecd230b8bc41456.png)

This block, is incorrect - it clearly says, when member page opens, if I am logged in, again open member page.  
Do you have a main menu, where all buttons are present? Because, this block should be like -  
When `member page` btn pressed, check login, and navigate accordingly.

Thanks! 😊

---

<div class="post-metadata">

### Author: ![16josephsrgz](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/16josephsrgz/32/61177_2.png) [@16josephsrgz](https://community.thunkable.com/u/16josephsrgz)
#### Post date: [February 21, 2020, 5:06pm UTC](https://community.thunkable.com/t/solved-private-login-screen/476648/9 "2020-02-21T17:06:50Z")

</div>

@kartik14 Got it working! Thank you so much, you’re very helpful :). All I had to do was change the member page opens to member page starts! :))

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 11:40am UTC](https://community.thunkable.com/t/solved-private-login-screen/476648/10 "2024-11-08T11:40:54Z")

</div>


