Fix page refresh breaking app

User is redirected to home page instead.