access denied is the failed redirect on the login page.
the login is failing because the form you have on the index page that posts to the login page does not have any elements in it to input your username and password.
if you want to add a login form to the index page, it must contain the same username and password elements as the one on the login page, make sure they have the same name, the names of the elements are the important part.