Fixes for #138

Added an extra class called PortalConfigLoader which is just responsible for making the asynchronous call. It then calls back to a success or failure message based on the result.

Includes tests.