What do you mean by "connect"?
If I assume that you mean connect information, then via HTTP.
For instance: We made both our website and our game client in Construct, in two separate project files. The website and game client communicate with each other via HTTP GET requests (with a few HTTP GET AJAX request interactions).
You login to our integrated portal on the website, then it records your session and retrieves your player_id from the server. Then when you select a game server, the website passes all of the information that the game client needs to know on startup into the client code via HTML injection. The website passes information, including the player_id, current_timestamp, server_ip, application_name, etc. The game client then uses that information to talk to the correct server.