Restrict max length in HTML inputs in new registration and session, and display errors nicely