title: login_onaccept actions not executed when logging in via CAS Consumer
body: <p>I have two web2py applications (cas_provider, cas_consumer).  </p>
  
  <p>In cas_consumer I setup auth to use cas_provider as the cas_provider:</p>
  
  <pre><code>auth = Auth(db, cas_provider='http://localhost:8000/cas_provider/default/user/cas', host_names=configuration.get('host.names'))
  </code></pre>
  
  <p>In cas_provider I add the below code to db.py, to send an email when a user logs in:</p>
  
  <pre><code>auth.settings.login_onaccept.append(lambda form: mail.send(to='you@example.com', subject='new user',
           message='user email is %s'%form.vars.email))
  </code></pre>
  
  <p>If I go to <a href="http://localhost:8000/cas_provider/default/user" rel="nofollow noreferrer">http://localhost:8000/cas_provider/default/user</a> and login directly to the provider, web2py logs that it tried to send the email.  However, if i go to <a href="http://localhost:8000/cas_consumer/default/user" rel="nofollow noreferrer">http://localhost:8000/cas_consumer/default/user</a> and login through the consumer, it appears that the login_onaccept function doesn't get called.</p>
  
  <p>It appears that this happens because when I login through the consumer Auth calls <code>cas_login(version=2)</code>  which in turn calls <code>self.login(next, onvalidation, cas_onaccept, log)</code>.  Where <em>cas_onaccept</em> is a function defined in <em>cas_login</em>.  Since the onaccept parameter is provided (i.e. ^= DEFAULT) self.login does not pickup the settings.login_onaccept setting defined in db.py. </p>
  
  <p>NOTE: auth.settings.login_onfail appears to work in both situations.</p>
  
  <p>Am I missing something or is this a bug in the way login_onaccept is handled via cas_login?</p>