Im not very sure myself but....
Just have a normal login/register screen that you think will fit in a small window. Just create the login/register page normally as if it would be a normal site. Be sure it fits tho!
Then, when the user tries to login have that site popup with set, unchangeable width, and height.
Of course, I could be totally wrong--but, its what I would have done...
Good Luck!