Adding auth to all pages except for the index page

Created log in functionality, placed auth code on all pages expect for
index.php (the log in page)