This chapter discussed Ajax and security, including how to handle malicious users and withstand JavaScript and SQL injection. You saw how to implement password protection, both in your code and in the server. You also saw how to send the username and password to the server using the XMLHttpRequest object, as well as using public/private key encryption to protect passwords.