[homepage] - Refactor homepage to use a middelware instead of an if-check clause. Update dependencies #282