Added code to check if the login obejct is null. If it is, then it's the first time the app is being used. The app was crashing for me because of that, so I added the check. If it is null, it now creates a new loginObject.