added user login validation

added chooseTitle function to HomeController