edit js and login controller