Rewritten authentication dialog. 100% finished. Needs polishing!