Adding logic to show logged in or logged out