log out and required login added