Popup loop & Login problem

If i use the virtual page when sign up to a course the popup goes in loop.
If i use shortcode the enrollment process says "you must login to..."

Could you help me please?