Added JS login controller