Enable RequireJS optimizer in the LMS

Convert combined login/registration page to use RequireJS optimizer

Move validation JS to the LMS and make it RequireJS compatible