Fiddling

Made the stuff work. Added database connection and initial support for
outputting patients and medicines. Fixed logging in and switched to a
filter-based approach to auth. Wasted time fiddling with database stuff
that I had to roll back because there's apparently a different set of
database changes on Andrew Brown's end. Am now bored, but have the first
two test cases passing. Next two are too trivial to be interesting, and
the rest rely on those database changes I can't do ;_;
Merge pull request #1 from Phoshi/master

Fiddling