Added redirect function to lib/http