Move double conditional checking of email provision and staging environment into single check.
Fixed the reverse setting for https redirection. It would redirect when the option was toggled off and vice versa.