Various login fixes