Connection finetuning

Fixed crash and button problems with login failures.