added logic to display home page when not logged in