@mdp: It isn't obvious to me how to mix the auth code with SQLFORM.factory and accept. The problem is that auth is such a black box that I don't know where to break into the flow of it.
I believe this issue has come up enough times and been such a consistent stumbling block that I suggest you or someone else spell it out concretely (show the model, controller, and view) and put it either in the doc or in Alterego or somewhere findable. I can't imagine it's more than 20 or 30 lines of code total and would save loads of time and effort in the long run.