If you don’t care about the actual action you can use login_init
action like this:
add_action( 'login_init', 'wpse8170_login_init' );
function wpse8170_login_init() {
// do your stuff here
}
But if you want to handle only special actions, then you need to hook into login_form_{action}
action, like this:
add_action( 'login_form_login', 'wpse8170_login_form_login' );
function wpse8170_login_form_login() {
// do your login stuff here
}
Or like this:
add_action( 'login_form_register', 'wpse8170_login_form_register' );
function wpse8170_login_form_register() {
// do your register stuff here
}
If you need to add some CSS or JS to your login page, then you need to use login_enqueue_scripts
action:
add_action( 'login_enqueue_scripts', 'wpse8170_login_enqueue_scripts' );
function wpse8170_login_enqueue_scripts() {
wp_enqueue_script( ... );
wp_enqueue_style( ... );
}