title: SecureSocial redirects all to onLoginGoTo - Play 2.1
body: <p>I added securesocial to a Play 2.1.3 project (Scala), it works fine with deadbolt. </p>
  
  <p>I expect non-authenticated requests to be redirected to login page and after log-in back to the original URL they had requested. However, in this case after login they are always being sent to the path defined at onLoginGoToin securesocial.conf, regardless of the page they requested before login.</p>
  
  <p>Am I missing some configurations?</p>
  
  <p>Thanks,</p>
  
  <p><strong>EDIT:</strong> 
  Here's how I'm using securesocial with deadbolt in my actions:</p>
  
  <pre><code>def list = Pattern("products.list", PatternType.EQUALITY, new MyDeadboltHandler) {
    SecuredAction { implicit request =&gt;
      Ok(views.html.products.list(Product.listAll))
    }
  }
  </code></pre>
  
  <p>And onAuthFailure in myDeadboltHandler:</p>
  
  <pre><code>def onAuthFailure[A](request: Request[A]): Result = {
    Logger.debug("authentication failure")
    Results.Redirect(securesocial.controllers.routes.LoginPage.login())
  }
  </code></pre>
  
  <p><strong>EDIT2:</strong></p>
  
  <pre><code>implicit def username(implicit request: RequestHeader):Option[Identity] = SecureSocial.currentUser
  override def getSubject[A](request: Request[A]): Option[Subject] = {
      val maySession = username(request)
      maySession match {
         case Some(session) =&gt; Some(new User(session.identityId.userId))
         case _ =&gt; None
      }
    }
  </code></pre>