logged out & security improvements