update class login and fix function fetchClassQuery