debugged login sequence