put variable inside relevant if statement to allow view without being lo...

...gged in