Add email helper, lots of rearranging and refactoring to make things work, home, login and register done