js for login block