added customAuthorize to redirect to a proper page