Hey!!
Yes. You need to register that marriage with your local office as soon as possible for recognization in Germany ( Benefits). The same day, you can apply for a Resident Permit (Marriage) while still in Germany under your student visa. Student Visa is for any and all education in Germany. So, find something new. No Stress