Fix login stuff; move login back to AppDelegate