added forgot login logic

also added detection of login for home page