throwing werkzeug.exceptions.Unauthorized for unauthorized