Fixed bug in tasks
Added confirmation email upon registration and handle double registration
Fixed some return codes in the API