diff --git a/lean/click.py b/lean/click.py
index 5c32a9c2..db0d10d5 100644
--- a/lean/click.py
+++ b/lean/click.py
@@ -17,12 +17,48 @@
 from click import Command, Context, Parameter, ParamType, Option as ClickOption
 from click.decorators import FC, option
 
-from lean.constants import DEFAULT_LEAN_CONFIG_FILE_NAME
+from lean.constants import DEFAULT_LEAN_CONFIG_FILE_NAME, CONTAINER_LABEL_LEAN_VERSION_NAME
 from lean.container import container
 from lean.models.errors import MoreInfoError
 from lean.models.logger import Option
+from lean.models.errors import AuthenticationError
 
 
+def get_whoami_message() -> str:
+    """
+    Retrieves a message indicating the currently logged-in user's name and email.
+
+    This function checks if the user is logged in by verifying the presence of a user ID
+    and API token. If the user is logged in, it retrieves the user's personal organization
+    and finds the admin member associated with that organization. It then returns a message
+    containing the admin member's name and email address. If the user is not logged in,
+    it returns a message indicating that the user is not logged in.
+
+    Returns:
+        str: A message indicating the logged-in user's name and email,
+             or a message stating that the user is not logged in.
+    """
+    api_client = container.api_client
+    cli_config_manager = container.cli_config_manager
+
+    if cli_config_manager.user_id.get_value() is not None and cli_config_manager.api_token.get_value() is not None:
+        try:
+            organizations = api_client.organizations.get_all()
+            logged_in = True
+        except AuthenticationError:
+            logged_in = False
+    else:
+        logged_in = False
+
+    if not logged_in:
+        return "not logged in"
+
+    personal_organization_id = next(o.id for o in organizations if o.ownerName == "You")
+    personal_organization = api_client.organizations.get(personal_organization_id)
+    member = next(m for m in personal_organization.members if m.isAdmin)
+
+    return f"logged in as {member.name} ({member.email})"
+
 class VerboseOption(ClickOption):
     def __init__(self, *args, **kwargs):
         super().__init__(["--verbose"],
@@ -73,6 +109,7 @@ def _parse_verbose_option(ctx: Context, param: Parameter, value: Optional[bool])
             container.docker_manager.get_image_label(engine_image, 'strict_python_version', "Unknown")
             container.docker_manager.get_image_label(engine_image, 'python_version', "Unknown")
             container.docker_manager.get_image_label(engine_image, 'target_framework', "Unknown")
+            container.docker_manager.get_image_label(engine_image, CONTAINER_LABEL_LEAN_VERSION_NAME, None)
         except:
             pass
 
@@ -83,6 +120,10 @@ def _parse_verbose_option(ctx: Context, param: Parameter, value: Optional[bool])
                      f"  .NET version: {dotnet_version}\n"
                      f"  VS Code version: {vscode_version}\n"
                      f"  VS Code installed versions: {vscode_installed_extensions}")
+        try:
+            logger.debug(get_whoami_message())
+        except:
+            logger.debug("Unable to retrieve login information. The user might not be logged in.")
 
 
 def verbose_option() -> Callable[[FC], FC]:
diff --git a/lean/commands/whoami.py b/lean/commands/whoami.py
index 6f4d5e43..0d3f2fb3 100644
--- a/lean/commands/whoami.py
+++ b/lean/commands/whoami.py
@@ -13,33 +13,11 @@
 
 from click import command
 
-from lean.click import LeanCommand
+from lean.click import LeanCommand, get_whoami_message
 from lean.container import container
-from lean.models.errors import AuthenticationError
 
 
 @command(cls=LeanCommand)
 def whoami() -> None:
     """Display who is logged in."""
-    logger = container.logger
-    api_client = container.api_client
-    cli_config_manager = container.cli_config_manager
-
-    if cli_config_manager.user_id.get_value() is not None and cli_config_manager.api_token.get_value() is not None:
-        try:
-            organizations = api_client.organizations.get_all()
-            logged_in = True
-        except AuthenticationError:
-            logged_in = False
-    else:
-        logged_in = False
-
-    if not logged_in:
-        logger.info("You are not logged in")
-        return
-
-    personal_organization_id = next(o.id for o in organizations if o.ownerName == "You")
-    personal_organization = api_client.organizations.get(personal_organization_id)
-    member = next(m for m in personal_organization.members if m.isAdmin)
-
-    logger.info(f"You are logged in as {member.name} ({member.email})")
+    container.logger.info(f'You are {get_whoami_message()}')