Here is a tutorial with screen shots on how to save your passwords and login information of your websites in Firefox before clearing your cache and cookies.
Do this step FIRST before clearing your cache and cookies in Firefox.
Make sure to open a New Private Window in Firefox!
Right Click on The Firefox icon to get the menu with New Private Window with Purple Mask Icon to the Left.
Then click on the 3 bars in the upper right hand corner of the page and then click on Options.
Click on Privacy & Security.
Scroll down to Logins and Passwords and check the box: Ask to save logins and passwords for website.
Now you are ready to clear your cache and cookies in Firefox without losing any login information you have saved.
Learn how to clear your cache and cookies in Firefox here.