My main website is a wordpress site.
WHMCS is installed in a folder called "e-billing" and it is located in the root of the wordpress installation within the public_html folder (where you find the wp-admin, wp-content folders).
In my homepage I have a header menu link called client login which leads to a page where you can login to the WHMCS client area.
What I want is that when a client has already logged into the client area, and he comes back to browsing my main website and now wants to go back to the client area, I want that client login link to detect the existing WHMCS login session and directly lead the client to the client area, rather than the login page.
So what should happen is to check if whether the WHMCS login session is there from my main website's side and change the code accordingly. How Can I access the WHMCS login/session details through my wordpress code?