Solution:
The problem was that the old location block does not pass the PHP configuration to the new block, so that PHP requests are not processed. The following solved this problem:
location ~* /wp-login.php {
auth_basic "Restricted Area";
auth_basic_user_file PATH TO .htpasswd;
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}