connected to firebase, saves the file and uses email if available.