adds initial login infrastructure (not yet complete).