added logic to display sign in or logged out status in Application view