A login screen, a public site search and a protected customer area serve different purposes. They should not receive the same SEO rule simply because their URLs share a word.
Establish what is visible while signed out
Fictional example: /search/ lists public services. After login, /account/search/ searches customer documents. The first needs an indexing decision; the second needs reliable access control for its results and files.
Check both addresses without a session. The customer area must not reveal result lists or document previews publicly. The visible login screen is a different resource from the protected content behind it.
For a public search page, investigate which parameters create different result lists and whether those lists are intended as independent search destinations. Adding a login would substantially change the user experience; it is not a minor SEO correction.
Record which public pages should be discoverable and which resources require authentication. A login screen does not necessarily need a search listing, but an indexing decision never replaces permission checks.
Avoid redirecting every unknown path to login. A missing public page should not appear to be an existing protected document. After changing the rules, check a public result, a protected record and a genuinely missing path separately.
Related check: Distinguish robots.txt from noindex.
If an existing application needs defined access roles, you can enquire about Integrate accounts and permissions.