To get started with login you first need to create a member group. Go to the Member section of Umbraco and right click on Member Groups and then Create a new one.
Create a new page and add the login widget. You can also set a redirect url where the user will be sent after a successful login.
Right click on the page or pages you want to hide from users that are not logged in. Right click on a page and select Public access.
You can choose to lock the page for a specific member or a member group. Point to the login page so that users get redirected here if they try to access the page without being logged in.
To logout simply create a link that goes here: