Will redirect user to home page if the user is logged in on page refresh