fixed JS specs and removed infinite recursion from identifyUser