Added if statement for user that is logged in