added logic to view to show and hide login link