Add homepage logic