fixed session middleware unit tests