Fix scoping issue on signup

closes #2429
Force preview to scroll to the end

fixes #958, fixes #535

- If the cursor is within the last 5 lines, then scroll to the end of the preview window, rather than using a ratio
Merge pull request #2428 from Decad/master

Fix scoping issue on signup
Merge pull request #2437 from ErisDS/cm-scroll

Force preview to scroll to the end