Defactored API infrastructure. Added environment settings for
UserService, PhotoService and FunctionalTests.