update controller for login