Rewritten authentication dialog. 50% finished.