Modified the cookie to track loggedin and authenticated users