Add authentication support

Signed-off-by: Julien Danjou <julien@danjou.info>