rename server flag to isserver, fix a bug in secret