Add the ability to use max_clients as a function

This also allow to change the tag layout before adding a new client [hack]