Add image handlers; add basic authentication handler
DRY up image handlers