Fix login encoding into the login screen & cleanup javascript