Add basic authentication to controllers and models.