Fixed REST server code auth permission error.