tidying up login controller.