added js for login