Various fixes to make it work again.

Also various improvements such as enabling xdebug and more users
created to start with.