Permissions are now checked for users. Students cant access teacher functiond and teachers cant access student functions.