jQuery(document).ready(function($){
    $('#togglePassword').click(function(){
        var $pwd = $('#user_pass');
        var $eyeOpen = $(this).find('.eye-open');
        var $eyeClosed = $(this).find('.eye-closed');

        if ($pwd.attr('type') === 'password') {
            $pwd.attr('type', 'text'); // show password
            $eyeOpen.hide();
            $eyeClosed.show();
        } else {
            $pwd.attr('type', 'password'); // hide password
            $eyeOpen.show();
            $eyeClosed.hide();
        }
    });
});