I think this method duplicates code we have elsewhere.  Could you extend existing login helpers to accept an arbitrary name/password?