SECOND AMENDMENT TO LOAN AGREEMENT AND SECOND AMENDMENT TO SENIOR SECURED CONVERTIBLE NOTE