To achieve a hook that triggers when a user accesses a client's account in WHMCS, you could propose creating a custom hook point. Since WHMCS v8 introduced Users and the ability for them to access multiple client accounts, it would indeed be beneficial to have a hook that fires not just on login, but also when a user switches to or accesses a client’s account.
https://snow-rider.io