title: Grails - handling authentication
body: <p><strong>Currently how my application works</strong>
  User comes to the site performs some tasks. On click of a button on a page if the user is not logged in the user is taken back to login page, where the user will have to either login or register.</p>
  
  <p>In controller method there is Secured annotation which maps to "auth" of DefaultSecurityConfig.groovy and is directed to login page.</p>
  
  <p><strong>What needs to be changed / achieved</strong>
  Currently it simply redirects to a controller/method where I lose the original request. I need to write my own handler which will do some action on the request object and then redirect to controller/method.</p>
  
  <p>I don't know how to.
  1. write my own handler.
  2. Will I need to override auth of DefaultSecurityConfig.groovy in my SecurityConfig.grooy so that it calls my handler 1st</p>
  
  <p>I am very new to Grails so please bear with me and try to suggest solution in detail.</p>