Allow controller to run behind an SSL termination proxy

If you have SSL termination setup on an AWS ELB (or other SSL termination proxy), the controller incorrectly redirects to HTTP when using HTTPS causing browser hangs and other problems.