fixes

Fixes a few errors with autodiscover and webfinger

Note: I'm by no way any php expert ;)