Update to login javascript