Fix offline authentication bug