Moved DOCTYPE to after php block so auth.php can set session header
Changed findAll to be compatible with older php version