Had this same issue and reading the comment from @JayMason triggered the fix for me...
Need to enable mods for apache2:
sudo a2enmod rewrite
sudo a2enmod headers
sudo systemctl restart apache2
After that the login and register pages started to work.