Add basic authentication.

Also refactored RequestFactory and removed Program Tests
(was going to get complicated)