Initial javascript for login