Use session directly in tests instead of a server.

Gets rid of localhost use in testing and allows concurrent test
execution.