Adding functions to hooks from within a class

I created a class instance and referenced that in add_action, which is moved below where the instance is created:

if ( ! function_exists('add_action') ) {
   header('Status: 403 Forbidden');
   header('HTTP/1.1 403 Forbidden');
}

if ( ! class_exists('My_Authentication') ) {
    class My_Authentication {
        public function setup() {
            add_action('wp_login', array(&$this, 'no_auth_allowed') );
            add_action('wp_logout', array(&$this, 'no_auth_allowed') );
        }
        public function no_auth_allowed() {
            wp_die('no authentication for you!');
        }
    }
    $my_auth = new My_Authentication;
}
add_action('plugins_loaded', array($my_auth, 'setup') );