I’m a big fan of modularising functions and only loading resources when needed. This snippet should be in your functions.php file and will only load an include file if a visitor is on the login or registration page. You can then squirrel your functions that customise the login experience or style it with CSS away here.
if ( in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) ) ) { require_once locate_template( 'INSERT_FILENAME_HERE.php' ); }