Hello,
I have seen that there was a post with the same problem that suddenly arose but it has no solution and they closed the topic. I have been working with the Moodle platform for years and since this month (April 2021) every new user when accessing for the first time, exiting and re-entering throws the error ...
"Bad data, try again."
Fun facts:
only with the new students. The rest have not had such a problem.
If the student clears the cache, saved passwords and data to complete the browser, it allows him to allow again until the end of his session; repeating the login problem.
Moodle version 2.7.2 - I have seen that the same problem also arises in higher versions (3.7) according to the post published by Josuke Net - in March 2020.
I look forward to your reply.