updated to force redirect login to HTTPS if SSL was selected in config