I currently have a login popup in my header bar which is on every page in my website. I want to be able to reload the current page that the person is on after a successful
Since Rails 5 (or maybe older versions), you have a request.referrer method. You simply redirect from controller to referrer and it opens the page where request came from.
redirect_to request.referrer, notice: "You're being redirected"