added login validation before access to any page in the frontend