Fixed login bug that occured do to change from mysql to mysqli