Solution:
I got it working.. auth_rediect()
did the trick. I replaced wp_redirect
to auth_redirect()
So the final code is:
function my_page_template_redirect()
{
if( is_singular( 'property' ) )
{
if(!is_user_logged_in())
{
auth_redirect();
}
}
}
add_action( 'template_redirect', 'my_page_template_redirect' );