chchanged header function from header("refresh … url") to
heheader("location: url") so the login successfully links to homepage.