devise authentication and sti implementation for student and teacher