title: Redirect in Shiny app
body: <p>I'm trying to make my Shiny app to redirect the user to another page. I'm using <code>httr</code> to send <code>GET</code> requests and see if the user is logged in. If he's not, I want to redirect him to another link. </p>
  
  <p>Can I do that using R / Shiny only, or do I need some extra libraries?</p>
  
  <p>sample: </p>
  
  <pre><code>library(httr)
  library(shiny)
  shinyServer(function(input, output) {
  rv &lt;- reactiveValues()
  rv$mytoken = session$request$token
  
  observeEvent(input$button1, {
    rv$a &lt;- GET("my.url:3405/authtoken", 
                add_headers(
                  .headers = c("token" = rv$mytoken)
                ))
    if (rv$a$status_code == 200) {
    } else {
      # redirect magic
    }
  })
  }
  
  shinyUI(fluidPage(
    actionButton(button1, "btn")
  ))
  </code></pre>