how to use login_redirect filter

I want to use the login_redirect filter but I can't figure how it works.

I use a child theme and I have added these lines in functions.php of the child theme:

function admin_default_page() {
return 'http://www.mydomain.com';
}
add_filter('login_redirect', 'admin_default_page');

This is just a simple test but it does not work. Users are not redirected to 'http://www.mydomain.com', they still go to the admin page.

Please advise.