Fixed some login issues and add/edited tests