Refactor #5971 Check whether manager template exists during manager login

http://tracker.modx.com/issues/5971