update constraint for login