How to check if is logged in with CLI

Is there a way with the CLI to check if the device is currently logged in (authorized)?