# Lock widget doesn't properly sign up a user: "“WE'RE SORRY, SOMETHING WENT WRONG WHEN ATTEMPTING TO LOG IN.“"

**URL:** <https://community.auth0.com/t/lock-widget-doesnt-properly-sign-up-a-user-were-sorry-something-went-wrong-when-attempting-to-log-in/6288>\
**Category:** Get Help\
**Tags:** lock, user-creation\
**Created:** [April 20, 2017, 1:13am UTC](https://community.auth0.com/t/lock-widget-doesnt-properly-sign-up-a-user-were-sorry-something-went-wrong-when-attempting-to-log-in/6288 "2017-04-20T01:13:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmed11](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@ahmed11](https://community.auth0.com/u/ahmed11)\
**Post date:** [April 20, 2017, 1:13am UTC](https://community.auth0.com/t/lock-widget-doesnt-properly-sign-up-a-user-were-sorry-something-went-wrong-when-attempting-to-log-in/6288/1 "2017-04-20T01:13:48Z")

</div>

When we try to sign up a user in our Electron application using the Lock widget, the user gets signed up and a verification email gets sent. However the lock widget goes to say:

“WE’RE SORRY, SOMETHING WENT WRONG WHEN ATTEMPTING TO LOG IN.“

If the user goes in to their email and verifies the account, they can log into the account just fine.

I feel this issue has to do with the lock widget attempting to auto-login the user when instead the user needs to be verified via email… But I’m not entirely sure as there are no errors being logged in any way.

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [April 20, 2017, 9:55am UTC](https://community.auth0.com/t/lock-widget-doesnt-properly-sign-up-a-user-were-sorry-something-went-wrong-when-attempting-to-log-in/6288/2 "2017-04-20T09:55:03Z")

</div>

If you do not want your users to be logged in directly after signup, you can set the `loginAfterSignup` attribute in Lock:

```
var option = {
  loginAfterSignUp: false
};

```

[https://auth0.com/docs/libraries/lock/v10/customization#loginaftersignup-boolean-](https://auth0.com/docs/libraries/lock/v10/customization#loginaftersignup-boolean-)

The Lock error may be due to a Rule that is returning an Unauthorized response due to an unverified email, as Lock tries to log the user in straight away. Setting the above `loginAfterSignup` to false will prevent Lock from trying to login the user.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:53am UTC](https://community.auth0.com/t/lock-widget-doesnt-properly-sign-up-a-user-were-sorry-something-went-wrong-when-attempting-to-log-in/6288/3 "2018-03-02T05:53:22Z")

</div>


