Modified code for security defects and removed logOutResponse.