Added checks for authorization in the views