There are some laws being put into place helping renters in these situations, but to my knowledge they have not been put into place as of yet. According to Fairfax County, the terms of the lease agreement are terminated once the home is foreclosed on. Here is a number for the county to gather more information on - Call 703-222-8435, TTY 711, or get help in person at 12000 Government Parkway, Suite 433, Fairfax, between 8 a.m. and 4:30 p.m.
I have heard of banks helping those renters by letting they stay in the property and also seen situations where they have given them cash for keys...basically moving expenses. What you have to focus on is the security deposit that the landlord is holding. If the home is in foreclosure, search for notices in the Washington Post and other papers. Good Luck.