Just a quick code snippet to describe how to authenticate with a specific user to a TFS collection:
1: TfsTeamProjectCollection collection = new TfsTeamProjectCollection(
2: new Uri(http://tfs:8080/tfs/DefaultCollection,
3: new System.Net.NetworkCredential(@"domain_name\username", "password"));
4:
5: collection.EnsureAuthenticated();