Yep, you have 6 opening brackets and only 4 closes. You're while loop is open as is you're isset($_POST['submit']).
As well, this block in you're while loop:
print 'You are now logged in.';
print 'The username and the password you entered do not match those on file.';
Will never execute. The preceding line has a break call in it terminating you're loop.