Code from last night and API Change

This includes an update to the code from last night (latest version, has error from the previous pull request fixed), as well as an addendum to the API as adding an Email should require the same level of checks as registering with one (in-fact, internally I'd probably recommend using the same functions for associating an email with a new account and adding an email to existing one).

Note, data code will likely be modified when I have time. Proposal for internal representation: http://i.imgur.com/5jQl471.jpg