implement some login behavior