writing the msyqli authentication