Add basic auth for preview environment

https://www.pivotaltracker.com/story/show/68867254
Adds basic auth middleware for use with the (Azure) preview environment.