login logic, theoretical without registration logic