cleaned login js