     withConvertedUserAndApiToken { createGroup : yes }, ({ group }) ->
       token = JUser.createJWT { username: 'non-existent-user', group : group.slug }
       ssoTokenLoginRequestParams = generateSsoTokenLoginRequestParams
-        body : { token }
+        qs  : { token }
+        url : { subdomain : group.slug }
 
-      request.post ssoTokenLoginRequestParams, (err, res, body) ->
+      request.get ssoTokenLoginRequestParams, (err, res, body) ->
         expect(err).to.not.exist
         expect(res.statusCode).to.be.equal 400
         expect(body).to.be.equal 'invalid username!'

  it 'should send HTTP 400 if api token is not set', (done) ->

    ssoTokenLoginRequestParams = generateSsoTokenLoginRequestParams
      body : { token : '' }

    request.post ssoTokenLoginRequestParams, (err, res, body) ->
      expect(err).to.not.exist
      expect(res.statusCode).to.be.equal 400
      expect(body).to.be.equal 'invalid request'
      done()


  it 'should send HTTP 400 if there is no username in jwt token', (done) ->

    ssoTokenLoginRequestParams = generateSsoTokenLoginRequestParams
      body : { token : JUser.createJWT { group : 'someGroup' } }

    request.post ssoTokenLoginRequestParams, (err, res, body) ->
      expect(err).to.not.exist
      expect(res.statusCode).to.be.equal 400
      expect(body).to.be.equal 'no username in token'

  it 'should send HTTP 400 if there is no group in jwt token', (done) ->

    ssoTokenLoginRequestParams = generateSsoTokenLoginRequestParams
      qs : { token : JUser.createJWT { username : 'someUsername' } }

    request.get ssoTokenLoginRequestParams, (err, res, body) ->
      expect(err).to.not.exist
      expect(res.statusCode).to.be.equal 400
      expect(body).to.be.equal 'no group slug in token'
