Fixed session code to make it http and secure only transmissions