making the session variables work with the loggin status