The current handlers:
get-logins
get-all-logins
exhibit inconsistencies in their response payloads, and the logic is duplicated.
Goal:
Ensure that the responses from both get-logins and get-all-logins are consistent.
Extract the duplicated logic so it can be reused across both handlers.