Added setSession() method to enable portable sessions (redis)