added use_https parameter for redirect function so that when logging out, you will no longer be using https