                       id: 'inputIdentifier'
                       placeholder: 'Email or username'
                       name: 'identifier'
-                      value: that.state.page.data.identifier
+                      value: page.data.identifier
                       onChange: that.handleChange
                     }
-                  k.div {className: 'form-group'}, ->
+                    if that.hasSuccess('identifier')
+                      # TODO put this into its own component
+                      k.span {className: 'glyphicon glyphicon-ok form-control-feedback'}
+                    if that.hasError('identifier')
+                      # TODO put this into its own component
+                      k.span {className: 'glyphicon glyphicon-remove form-control-feedback'}
+                  k.div {
+                    className: classNames(
+                      'form-group'
+                      {'has-success': that.hasSuccess('password')}
+                      {'has-error': that.hasError('password')}
+                      {'has-feedback': that.hasFeedback('password')}
+                    )
+                  }, ->
                     k.label {htmlFor: 'inputPassword'}, 'Password'
                     k.input {
                       type: 'password',

      # errors = validateLogin nextState.page.data
      # if errors
      # this.update {page: {errors: {$set: errors}}}
    render: ->
      that = this
      console.log 'ComponentLogin', 'render', 'this.state', this.state
      reactKup (k) ->
        k.div {className: 'ComponentLogin'}, ->
          unless that.state.page.data?
            return
          k.build ComponentNavigation
          k.div {className: 'container'}, ->

      updated = React.addons.update this.state, command
      errors = validateLogin updated.page.data
      console.log 'errors', errors
      this.update
        page:
          data: {$merge: delta}
          errors: {$set: errors}

    handleClick: (event) ->
      event.preventDefault()
      that = this
      console.log 'ComponentLogin', 'handleClick', this.state.page
      if that.hasErrors()
        this.update
          page:
            hasBeenClicked: {$set: true}
        return
      login(that.state.page.data)
        .then (response) ->
          console.log 'success', response
        .fail (error) ->
          console.log 'error', error
    componentWillMount: ->
      console.log 'ComponentLogin', 'componentWillMount'
      this.update
        page:
          data: {$set: {}}
          errors: {$set: validateLogin {}}
    componentWillReceiveProps: (nextProps) ->
      # after calling `this.update()` in `handleChange` there is no guarantee
      # that `this.state` already reflects our changes.
