Fixes NPE when accessing firstpage from an ending page.

Refs #36
Adds basic auth to NetworkUtils for WatchDog
Implements masquerading