Wrote and tested by_student scope for registration