register and login: controller implementation