JS refactor. Authentication and rough login form & logic on client-side. Tiny change in Java regarding authentication type.