Improve modal behaviour
The dialogs are all modals, so should be marked up with related WAI-ARIA (see https://www.w3.org/TR/wai-aria-practices/#dialog_modal). Modals should trap the cursor in the dialog, with focus looping through the dialog, rather than moving to the page in behind the dialog when focus reaches the last element. Dialog are closed by either user input (submitting registration or login), or using the Escape key. If the dialog is dismissed, focus should return to where the dialog was opened from.