This is a general workflow which you should follow while trying to integrate LHC back office directly to third party systems.
As in resume I would recommend just to generate login link if you don't want to mess with source code.
Integrating login link
This is preferred method. With this method user is presented simple link, which opens LHC back office and logins visitor automatically.
Principle should be similar how chrome extension works.