Intercept loading of a certain page

One way to approach this is to intercept the page load with the template_redirect action and test user status before rending the login page. Based on user status you could redirect to another page instead of loading the original page content.

function wpse_is_user_good_enough() {
    if ( ! is_page( 'your-login-page-slug-here' ) ) {
        return;  // Not the login page so return early
    }

    // The login page is loading. Ck user status here and bounce them or send them along
}
add_action( 'template_redirect', 'wpse_is_user_good_enough' );

The above example will hook the wpse_is_user_good_enough function to the template_redirect action. Test right away if this is the page you wish to intercept; return if not.

If you have a PHP template dedicated to the login page, you can embed your user status test on the page template and skip the rest. Using a page template would allow you to display alternate content instead of redirecting an unauthorized user.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)