# config/initializers/avo.rb
Avo.configure do |config|
  # other pieces of configuration

  # tell Avo how to sign out the authenticated user.
  config.sign_out_path_name = :session_path
end
```

## 3. Ensure only authenticated users are allowed on Avo

Now, here comes the part which might seem unfamiliar but it's actually pretty standard.

The scaffold adds the `Authentication` concern to your `ApplicationController` which is great. We will add it to Avo's `ApplicationController` and also add the `before_action`, but instead of just appending it wil will prepend it so we can ensure it will be fired as soon as possible in the request lifecycle.

Since `require_authentication` runs in the Avo context, it's necessary to delegate the `new_session_path` to the `main_app` to ensure proper routing.

```ruby{4,5,8}