Dawn theme, javascript for login template

Ah at least for the UI toggle between login & recover that is actually handled by CSS in some themes.

For dawn that should be in customer.css .

They use ::target psuedo selector to change styles based on the url hash/fragment : none, or #login or recover .

You’d want to jump into browser devtools and inspect this off and on interaction flipping the display:none / display:block

If by recovery message you mean the area/text after the recovery link is used from the recovery email I’m not sure we can intercept that besides maybe capturing the form body and parsing the form-body that’s rendered?

Or maybe changing the text in locales.

Or maybe note that a lack of errors means success if trying to do liquid logic.

You could try pushing the form object into json and inspecting that output text on the frontend to see if something stands out.