Overlay Login box vs On nav-bar login button

Suppose, A website having public login option and Users can see other profile, posts and read news without logging-in. So how to show login (alert/box) to those user who not have logged-in?

Options:

  1. Overlay login box (preview).
  2. On nav-bar login button (Like: StackOverflow).