added some login func