updated login authentication by adding a cookie as a session variable
cookie expires after 20 minutes, unless a note is added (user activity), in which case the session length is extended a further 20 minutes.