You need to seek help here as soon as possible.  The law has given tenants a lot more rights with regard to foreclosed properties but the thing is that the new landlord can not  accept rent for an apartment that is illegal so they have no choice but to give you notice to vacate.  You could try and negotiate a longer stay but it is unlikely that they will agree to after you return for the summer.  They could evict you by then.  Please get help.  Good luck.