test login with API post request.