save notifications clean up, only set security object when couchdb username/password

is provided, cleanup for generic monitor unit tests