Add ability to create a client with a token

Allows creating a client with a token directly.

Sorry about the unrelated whitespace fixes, my editor automatically removes trailing whitespace and adds a newline at EOF. Since its such a small PR and removing the whitespace is good, I figured you probably wouldn't mind.