# Redirect to login page if current user logged out

**URL:** <https://forum.bubble.io/t/redirect-to-login-page-if-current-user-logged-out/188514>\
**Category:** Need help\
**Created:** [January 27, 2022, 12:35pm UTC](https://forum.bubble.io/t/redirect-to-login-page-if-current-user-logged-out/188514 "2022-01-27T12:35:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![edwinhaver](https://avatars.discourse-cdn.com/v4/letter/e/e5b9ba/32.png) [@edwinhaver](https://forum.bubble.io/u/edwinhaver)\
**Post date:** [January 27, 2022, 12:35pm UTC](https://forum.bubble.io/t/redirect-to-login-page-if-current-user-logged-out/188514/1 "2022-01-27T12:35:46Z")

</div>

I want to redirect a user to the login page if they are not logged on.

I have seen a topic on this already and indeed if you set up a “User is logged out” event on the page, you can redirect it to the login page. The problem is that it still loads the page and then redirects. This will actually show the page for a second before it redirects. I can of course conditionally show a group that contains all the page elements if the user is logged in and then it won’t show. This seems a bit of a workaround to me.

Is there a better way of doing this? I don’t really want to set this up on every page.

Regards, Edwin.

---

<div class="post-metadata">

**Author:** ![rpetribu](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rpetribu/32/90852_2.png) [@rpetribu](https://forum.bubble.io/u/rpetribu)\
**Post date:** [January 27, 2022, 2:03pm UTC](https://forum.bubble.io/t/redirect-to-login-page-if-current-user-logged-out/188514/2 "2022-01-27T14:03:10Z")

</div>

> [@edwinhaver](#):
>
> I can of course conditionally show a group that contains all the page elements if the user is logged in and then it won’t show.

Yeah yeah… unfortunatelly, this is the best way. 🙄

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [April 7, 2022, 12:36pm UTC](https://forum.bubble.io/t/redirect-to-login-page-if-current-user-logged-out/188514/3 "2022-04-07T12:36:24Z")

</div>

Closed on April 7, 2022, 12:36pm UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
