Added register api and made email required.
Clean up config a bit.