Flesh out registration/login logic. Closes #23.