changes to display media json and unauthorize page for users
unathorized page for unathorized users