           setUserPasswordStatus queue, username, 'valid'
 
         ->
+          # expecting successful login
           JUser.login clientId, loginCredentials, (err)->
             expect(err).to.not.exist
             queue.next()

            queue.next()

        ->
          JUser.one { username : loginCredentials.username }, (err, user) ->
            expect(err).to.not.exist
            lastLoginDate = user.lastLoginDate
            queue.next()

        ->
          JUser.login clientId, loginCredentials, (err) ->
            expect(err).to.not.exist
            queue.next()

        ->
          # expecting login date to be saved successfully
          JUser.one { username : loginCredentials.username }, (err, user) ->
            expect(err)           .to.not.exist
            expect(lastLoginDate) .not.to.be.equal user.lastLoginDate


        ->
          # blocking user for 1 day
          untilDate = new Date(Date.now() + 1000 * 60 * 60 * 24)
          user.block untilDate, (err) ->
            expect(err).to.not.exist
            queue.next()

        ->
          # expecting login attempt to fail and return blocked message
          JUser.login clientId, loginCredentials, (err)->
            toDate = user.blockedUntil.toUTCString()
            expect(err.message).to.be.equal JUser.getBlockedMessage toDate
