I remember having trouble with this on mineOS.
The problem was that the serverclock was wrong and that somehow affected the authentification. I think the server says to the client “I don’t belive you! That authfication token is to old.”
The resulution was to set the clock to current time.