How to assign authorship when publishing with Bachelor's and Master's students
...but they might also consent to not being given authorship.


No, no and no. If it is your students' BSc or MSc thesis, they should be co-authors. Period. 


  ...I will have to write up the article.


You are right. That is why in those cases, you may be first author on the paper (according to your discipline's norms). 

Also, you should always discuss BEFORE assigning the MSc and BSc theses' topics, that ideally you want to work on the suggested topic so that you will get a publication out of it. Also you should make clear that if a student's thesis results in a paper, then the student gets to be co-author on the resulting paper and additional work might be required from him. Earlier discussion always leads to fewer disputes later-on.