Load JS Script only for custom post types

To enqueue scripts on the front-end, the hook should be wp_enqueue_scripts, not login_enqueue_scripts.

Also, a better way to see if you’re on a single custom post type is to use is_singular() and pass the post type you want to check:

if ( is_singular( 'events' ) ) {
}

get_post_type() relies on the global $post object, and not the main query. They’re often the same but under some circumstances the $post object might not be the same post as the current single post.

error code: 523