Preferences used when login/clear

Preferences are used. Added clear button with functionality and a
autologin checkbox without.