adds login infrastructure (not yet complete).