want to make user-login before view contain
you can go for LoginToboggan module .

 The LoginToboggan module offers several modifications of the Drupal login system
 in an external module.



    Allow users to login using either their username OR their e-mail address.

    Allow users to login immediately.

    Provide a login form on Access Denied pages for non-logged-in (anonymous) users.

    Customize the registration form with two e-mail fields to ensure accuracy.

    Optionally redirect the user to a specific page when using the 'immediate login' feature.

    Optionally redirect the user to a specific page upon validation of their e-mail address.

    Optionally display a user message indicating a successful login.

    Optionally combine both the login and registration form on one page.