Fix authorization middleware, and throttle in redis, global and by
function