Add registration functionality

I think i did it ;-)