added logic to display login and sign out in application.view