log in function fixed