Fix service initialization and behaviour when authentication is required