Cleanup + Connector Authentication

I am not sure which coding guidelines you follow, but I found the C# code to not follow standard C# coding style. Therefore I cleaned it up. I also removed variables that were not used.

The real contribution is a new method useful for getting the cookies for a connector that uses authentication.

Use it if you like :)