Fixes #37

Also made validation for registering. Now one can only register with
same email once and only once.