Add headers to register function