More protection needed? PHP secure
One major concern is that you define the array of account names and their associated hashed passwords in the file that, presumably, is publicly accessible through a web server. 

You might be tempted to think this is not a concern, because users will not be able to see the source code, right? Generally speaking, that's correct. However, if the web server somehow becomes misconfigured at some point, where .php files are not executed by the PHP engine, but in stead are served as plain text, you have a big security issue: any visitor will now be able to view the account info.

To deal with this, you should keep this sensitive information outside of the server's public directory.

So, let's imagine this is your web server's directory structure:

 - etc/
 - private/ &lt;-- A hidden private directory, outside of the public directory
 - public/ &lt;-- The public root directory from which your .php pages are served
   - img/
   - js/
   - authentication.php
   - protected.php


...then you should, for instance, put your account info in private:

 - etc/
 - private/
   - accounts.php
 - public/
   - img/
   - js/
   - authentication.php
   - protected.php


accounts.php would then look like this:

&lt;?php
return array (
    'sebas' =&gt; '$2y$10$96Yi1ezzoS6xZYjPhbvYTeCha.YypKF.7MSYwfruXtKaFyeGRLeMK',
    'bert' =&gt; '$3g$10$96Yi1ezzoS6xZYjPhbvYTeCha.YypKF.7MSYwfruXtKaFyeGRLeMK',
);


authentication.php would then do something like this:

&lt;?php
session_start();

if($_SERVER['REQUEST_METHOD'] == 'POST'){
    // I personally prefer to name this variable as plural
    $accounts = include '../private/accounts.php';

    // if include has failed, it will return false
    if(is_array($accounts)) {
       // continue your authentication procedure
    }

... etc.