Sign in failed

I've had that pop up on my S4 before too. I did a restart, input my credentials and it was gone. Looks like an S4 specific glitch. What carrier you with?
 
I had this problem with my Yahoo mail account.
If this is the case, just download the Yahoo mail app and remove your yahoo account from the stock email app.

Posted via Android Central App
 
I stopped using the mail tool on my EVO and now on my GS4 because of this same problem. I just use the Yahoo app now.
 
Change Incoming IMAP Server address from "imap.mail.yahoo.com" to "android.imap.mail.yahoo.com"
Change Outgoing SMTP Server address from "smtp.mail.yahoo.com" to "android.smtp.mail.yahoo.com"
 
I did this like a month ago, it fixed it then however a month later having the same issue again & it still has it changed.