doing login logic, more progress