Added authentication handler and first tests