I'm creating a website which has a login function. Once the user logs in, they are shown a button that allows them to log out. When the user logs in, a boolean variable on the server is changed to "true", because the user has logged in. When the user clicks the logout button, the boolean variable changes to "false". My question is, should I be storing this information in a http cookie instead of a variable? (I'm thinking that storing this in a variable on the server might slow down the website.) I'm using this variable for the purpose of letting the user go directly to the website the next time they visit if they haven't logged out, instead of having to login every single time.
Edited by shaqtus: n/a