Adding registration/login logic.