Multidir - tests and polishing for sessions REST API

[This is against multidir]

I added some tests for the sessions REST API spec. This revealed a couple of failures (missing status codes). I also cleaned up some imports and local variables that weren't used.