fix login javascript