finish the auth middleware demo