storing local variable to check if user is logged in
fixed merge conflicts