added some login functionality