Added optional IP authentication, fixes #6