minor code improvements Login