Added page re-direct depending on login state