# Prevent automatic login after Registration

**URL:** <https://forum.keycloak.org/t/prevent-automatic-login-after-registration/452>\
**Category:** Configuring the server\
**Created:** [November 17, 2019, 10:44pm UTC](https://forum.keycloak.org/t/prevent-automatic-login-after-registration/452 "2019-11-17T22:44:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![relsayed](https://avatars.discourse-cdn.com/v4/letter/r/8797f3/32.png) [@relsayed](https://forum.keycloak.org/u/relsayed)\
**Post date:** [November 17, 2019, 10:44pm UTC](https://forum.keycloak.org/t/prevent-automatic-login-after-registration/452/1 "2019-11-17T22:44:22Z")

</div>

Hello,  
I have enabled the Resigtration link in the login page. I also don’t need to verify email. Actually my use case is the following:  
Upon Registration a User should be created as disabled.  
Admin user verifies the account then enables the user.

The problem is that the user is automatically logged in. Any idea?

Thanks a lot

---

<div class="post-metadata">

**Author:** ![relsayed](https://avatars.discourse-cdn.com/v4/letter/r/8797f3/32.png) [@relsayed](https://forum.keycloak.org/u/relsayed)\
**Post date:** [November 19, 2019, 9:03pm UTC](https://forum.keycloak.org/t/prevent-automatic-login-after-registration/452/2 "2019-11-19T21:03:15Z")

</div>

A workaround to the automatic login, could be  
Go to “Authentication”, and in the “flows” drop down choose the registration flow. Copy the registration flow to e.g. registration2. In registration2 add a new execution “Username Password Form” to the end and mark it as required.

Use this flow instead of the default one (In Binding, choose registration2 in the drop down “Registration Flow”)

This shows the login page after the user finishes registration. However the problem is that this approach is not valid when a different login approach e.g. kerberos is used.

Also I still have the issue of creating a user as disabled not solved.

---

<div class="post-metadata">

**Author:** ![Asperitas](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@Asperitas](https://forum.keycloak.org/u/Asperitas)\
**Post date:** [June 5, 2021, 6:59am UTC](https://forum.keycloak.org/t/prevent-automatic-login-after-registration/452/3 "2021-06-05T06:59:41Z")

</div>

do you known same process with email verification. i.e. after email verified user not directly login but instead of redirect to login page.
