Updated SQL queries to validate email and password