Fix session handle tests so that multiple copies of the test can run
at the same time.
Merge branch 'session-hooks' into hash-login-tokens