rework javascript interface for authentication modules