Added registration and logout

Signed-off-by: Julien 'Tyloo' Bonvarlet <jbonva@gmail.com>