 
   propTypes:
     title: React.PropTypes.string
+    window: React.PropTypes.shape(
+      open: React.PropTypes.func
+    )
 
   getDefaultProps: ->
     title: 'You need to login or signup in order to use ConceptCoach™'
+    window: window
 
   getInitialState: ->
     loginWindow: false

    User.endpoints.login + '?parent=' + encodeURIComponent(window.location.href)

  loginLink: (msg) ->
    <a data-bypass onClick={@openLogin} href={@urlForLogin()}>
      {msg}
    </a>



    width  = Math.min(1000, window.screen.width - 20)
    height = Math.min(800, window.screen.height - 30)
    options = ["toolbar=no", "location=" + (if @props.window.opera then "no" else "yes"),
      "directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no",
      "width=" + width, "height=" + height,
      "top="   + (window.screen.height - height) / 2,
      "left="  + (window.screen.width - width)   / 2].join()
    loginWindow = @props.window.open(@urlForLogin(), 'oxlogin', options)
    @setState({loginWindow})
    _.delay(@windowClosedCheck, SECOND)

