fix session handling when using memcache

currently doesn't work if type is memcache as there is a hardcoded 'memcached' in the argument.