beginning of login work