Test login required middleware