testing the login process using the api