Login controller

The controller for login is done. Please check it.