Have you gone through this quickstart document that explains how to use the sign in widget? - https://developer.okta.com/quickstart/#/widget/nodejs/generic
If the user already has a session with Okta and you redirect to the login page (with your redirectURL specified as http://localhost/urlA), you will not have to login again. The user will be automatically redirected to your page.
The linked document actually has this code snippet where you actually check if the user has an active session using oktaSignIn.session.get() and render the sign in page only if the user doesn’t an active session.