# How do I create a new Sign Up / Login Button?

**URL:** https://meta.discourse.org/t/how-do-i-create-a-new-sign-up-login-button/222250
**Category:** Support
**Created:** [March 29, 2022, 4:08am UTC](https://meta.discourse.org/t/how-do-i-create-a-new-sign-up-login-button/222250 "2022-03-29T04:08:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hyphalos](https://avatars.discourse-cdn.com/v4/letter/h/3ab097/32.png) [@hyphalos](https://meta.discourse.org/u/hyphalos)
#### Post date: [March 29, 2022, 4:08am UTC](https://meta.discourse.org/t/how-do-i-create-a-new-sign-up-login-button/222250/1 "2022-03-29T04:08:38Z")

</div>

Hey Discourse team,

I was looking to create a `Login to RSVP` button in conjuction with this awesome Events plugin created by pavilion:  
[https://github.com/paviliondev/discourse-events](https://github.com/paviliondev/discourse-events)

I managed to create the button with JS:

 ![Screen Shot 2022-03-29 at 3.02.31 pm](https://global.discourse-cdn.com/meta/original/3X/a/b/ab1a56e0ca493fa5df6d2c89d025c4b1a7591a83.png)

I’m having trouble creating a Sign Up / Login path from here. The goal was to create a Sign Up / Login button that redirects them back to the page they came from.

I’ve tried:

1. `/login` but that does not redirect the user back to the Topic
2. When I attemped this `api.decorateWidget` fix (which has great instructions btw! Kudos 🙂 )  
[Developing Discourse Themes & Theme Components](https://meta.discourse.org/t/developer-s-guide-to-discourse-themes/93648)

Whenever I would declare `topic-title:before` or `topic-title:after` as the `NAME:LOCATION`, the helper doesn’t post it anywhere on the screen, I’m guessing this might be in conflict with the events plugin? It works with `header-buttons:before`

Another thing I was thinking if it’s possible is to just forward the current window as a `referer` so it redirects back after SSO

Any thoughts?

Cheers!

---

<div class="post-metadata">

### Author: ![hyphalos](https://avatars.discourse-cdn.com/v4/letter/h/3ab097/32.png) [@hyphalos](https://meta.discourse.org/u/hyphalos)
#### Post date: [March 29, 2022, 1:41pm UTC](https://meta.discourse.org/t/how-do-i-create-a-new-sign-up-login-button/222250/2 "2022-03-29T13:41:22Z")

</div>

I found some similar issue posted but those seemed to want to create the login button after posts, I was just hoping to add it near the title. Would I have to actually do createWidget() instead?

---

<div class="post-metadata">

### Author: ![hyphalos](https://avatars.discourse-cdn.com/v4/letter/h/3ab097/32.png) [@hyphalos](https://meta.discourse.org/u/hyphalos)
#### Post date: [March 30, 2022, 10:39pm UTC](https://meta.discourse.org/t/how-do-i-create-a-new-sign-up-login-button/222250/3 "2022-03-30T22:39:03Z")

</div>

Has anyone else tried to re-create the Sign Up / Login button elsewhere on their Discourse site?
