Print registration and login forms on same page
print(drupal_render(drupal_get_form('user_register_form')));
print(drupal_render(drupal_get_form('user_login_block')));


See user_register_form() and user_login_block() for details. Note that user_register_form is an unusual form builder function: it redirects in some cases.