added admin login and index page and fixed some php warnings