Couple of enhancements.

@Tubyhes could you QA and merge? Sorry for putting it all in one commit.

- Added option to use HTTP, dev by default uses HTTP
- Added API_KEY authentication
- Added request for /states/default/check