implement authentication and authorization to user

Probably the easiest way is to use a plugin.

Ultimate Member – User Profile & Membership Plugin is a good one.

Activate it on your site, then in the settings you can limit your site to be accessed only by logged in users. If they are not logged in, you can redirect them to the login page.

Make sure to uncheck the “Allow Homepage to be accessible” checkbox.