Website javascript for authentication