refactor the logic of deciding if the outcome of an attempt is true/false. remove the logic from the controller, instead put it into a callback method in the attempt model. also update the unit tests to test for attempts.