Please help me understand why my login is not working

Hi all okay so when i click on my home page on my login button it takes me to my login screen that all works well but when i submit the form it just reloads the page and does not redirect to the page specified in my controller. Also the error i want to display on the form does not work it gives me a parse error and i know that it is correct on the page.

Haven't used CI in years so can't remember if array variables passed to a view are extracted or not. You're passing $data['error'] and picking it up as $error in the view. Is this right? I can't remember.