Adding login logic in HomeController

Login logic for HomeController methods