Your content is present on different server, so which means you will have to use some connection or an API to get the data from either server on the other server in this application context.
This is where, you define an API, a Class library to let developers from other environment or application make use of your product. Lets assume the Server1 lets the users to Login, a Login service is provided by them, you need to create an API, which would expose different properties for each user (client) such as,
- IsLoggedIn
- UserId
- MemberOfGroup
.. and other authentication related methods and properties. Which would be then used by the Server2 where the application resides to get the details. This method is used by many other websites, think of
Mozilla's Persona[
^], or login services using Facebook, Twitter, Google+ accounts. They're all same and are known as
Social Login[
^].
A turn around is, to import that login page to your own server, and call it each time the user comes to your website.
You should know, that a server can host websites with different domains on the same machine, so it will be easy to call the (login) resource on the application itself.