This is on Chrome (I can't imagine it being different for Firefox), click the LastPass icon and choose Preferences
from the menu. Under the General
tab, tick Automatically Logoff when all browsers [...]
and set the number of minutes to 0
.
To make Firefox prompt for your credentials at startup, pick a website that you've set LastPass to automatically log in, and leave it open as a tab.
Next, go to the Advanced
tab. Tick the Open login dialog when browser starts
option, then click Save
.