                 for answer in booking.survey_answers
                   if (answer.question_text) == question.name && answer.value
                     question.answer = answer.value
+            $scope.setLoaded $scope
     , (err) ->
       $scope.setLoaded $scope
       failMsg()


  $scope.submitBookingRef = (form) =>
    return if !ValidatorService.validateForm(form)
    params = {booking_ref: $scope.booking_ref, url_root: $scope.bb.api_url, raw: true}
    auth_token = $sessionStorage.getItem('auth_token')
    params.auth_token = auth_token if auth_token

  $scope.login = {email: "", password: ""}
  $scope.login_error = false
  $scope.booking_ref = ""

  $scope.notLoaded $scope

  $rootScope.connection_started.then ->
    init()
