Integrate Form

I am going to make a login page like FaceBook(). In home page I am trying to create login form at top and registration page at below. So how can I manage it?

Can anybody help me?

If this login and registration have to be displaied in all pages, create a widget.

A widget is like a small controller, that can manage input and renders partial views.

Or a portlet:

Beware that this extension is quite old, and the XPortlet class is now yii/framework/zii/widgets/CPortlet.php

But the principle still holds. ;)