To log in to what system? Over what protocols?

If the service you're using is not part of the same domain/workgroup then it isn't even practical, if possible at all. SQL Server connection strings can specify integrated authentication. Various HTTP Request objects can too, though that assumes (1.) IIS, and (2.) same domain/workgroup. The same goes for DCOM.

I think we are still very much in the dark about what you want to do.