WIP improvements to authentication and header.