login protect the form list, 404 instead of 500-ing when no form found

- fixes Case:54012
- also clean imports and fix warnings
Merge pull request #12 from dimagi/cz

login protect the form list, 404 instead of 500-ing when no form found