You could use the PHP session variables to do it, ie. when the form is submitted to page C, it starts a session and saves the values. When page B is loaded, it can read those values from the users PHP session and authenticate.
The easier way to to it is pass the details straight to page B and let it do the login, using a piece of javascript on page B you can check to see if a frame is present, and if not, redirect. As the user should already have a session at this point, it should work fine.