Redirect to home page from index.php

Added a session check and redirect to home page.