Optimal control and global stability of the SEIQRS epidemic model