Fixing a security issue with the sessions page