Secure sessions fix