converted login from mysql to mysqli