Added if statement for starting session