I'm fairly new to Java and Android Development. I'm trying to make an app for my website. I'm using `Retrofit` to connect to my REST web service. 

The following is a piece of code that I'm using to iterate through the ids of the customer and for each id, a call is made to retrieve the email associated with the id. `authenticateUser` method receives the username, the password and the list of ids(Customer ids). The ids are located at mywebsite/api/customers.
The emails are available at mywebsite/api/customers/id

```
public class Authentication {

    private static String receivedEmail;
    public static boolean authenticateUser(List<Integer> ids, final String username, String pass) {
        RestAdapter adapter = new RestAdapter.Builder().setEndpoint(MainActivity.ENDPOINT).build();
        AuthenticationUsernameAPI api = adapter.create(AuthenticationUsernameAPI.class);
        final boolean[] found = {false};
        for (Integer id: ids) {
            if (!found[0]) {
                api.getUserEmail(id.toString(), new Callback<CustomerLoginEmail>() {
                    @Override
                    public void success(CustomerLoginEmail customerLoginEmail, Response response) {
                        receivedEmail = customerLoginEmail.getCustomer().getEmail().toString();
                        if (receivedEmail.compareTo(username) == 0) {                        
                            found[0] = true;
                        }
                    }

                    @Override
                    public void failure(RetrofitError error) {
                        Log.d("ERROR", error.getMessage());
                    }
                });
            } else {
                return true;
            }
        }
        return false;
    }    
}   

```

The method `authenticateUser` **always** returns false. Please help