function shakeError(element){
    if(element.style.opacity == 1){
        element.classList.remove('shake')
        void element.offsetWidth
        element.classList.add('shake')
    }
}
Shake a login error to add emphasis.

@param {HTMLElement} element The element to shake.