I solved it by simply restarting my computer. If that doesn't work check if there are updates available for Xcode and install them. If that doesn't work either check out this stackoverflow question: https://stackoverflow.com/questions/32762916/stuck-on-authenticating-when-uploading-to-app-store