Fix FTBFS after previous commit: now realm name is really configurable
Add missing inclusions
Fix multiple definition linker error in http_util
Replace delegate pattern for handling HTTP requests with functor pattern.