Add duplication user email checking

Code refactoring, add unit tests.
Good article about testing EF:
http://msdn.microsoft.com/en-us/data/dn314429.aspx