               k.div {className: 'col-md-4'}, ->
                 k.h1 'Login'
                 k.form ->
-                  k.div {className: 'form-group'}, ->
+                  k.div {
+                    className: classNames(
+                      'form-group'
+                      {'has-success': that.hasSuccess('identifier')}
+                      {'has-error': that.hasError('identifier')}
+                      {'has-feedback': that.hasFeedback('identifier')}
+                    )
+                  }, ->
                     k.label {htmlFor: 'inputIdentifier'}, 'Email or username'
                     k.input {
                       type: 'text',

      updated = React.addons.update this.state, command
      errors = validateLogin updated.page.data
      console.log 'errors', errors
      this.update command
    handleClick: (event) ->
      event.preventDefault()
      console.log 'ComponentLogin', 'handleClick', this.state.page
      login(this.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: {}}}}
    componentWillReceiveProps: (nextProps) ->
      # after calling `this.update()` in `handleChange` there is no guarantee
      # that `this.state` already reflects our changes.

      # errors = validateLogin nextState.page.data
      # if errors
      # this.update {page: {errors: {$set: errors}}}
    hasSuccess: (name) ->
      this.state.page.data[name]? and not this.state.page.errors?[name]?
    hasError: (name) ->
      this.hasBeenClicked() and this.state.page.errors?[name]?
    hasFeedback: (name) ->
      this.hasSuccess(name) or this.hasError(name)
    hasErrors: ->
      this.state.page.errors?
    hasBeenClicked: ->
      this.state.page.hasBeenClicked is true
    render: ->
      that = this
      console.log 'ComponentLogin', 'render', 'this.state', this.state
      page = that.state.page
      reactKup (k) ->
        k.div {className: 'ComponentLogin'}, ->
          unless page.data?
            return
          k.build ComponentNavigation
          k.div {className: 'container'}, ->
