Added a check as to whether the 'user' class in the MainActivity class is null. Still need to add a loader to the class.