Login logic is now in a thread