Added authorization and authentication check to admin panel