Fixed a bug in the AppHost breaking authentication