Implemented permissions

I have added two permission roles, Teacher and Student. The
permissions checking denies users from doing tasks they are not
supposed to. Also the permissions checking mechanism will throw
an exception if the user is trying to access pages without logging
in. The exception will cause the user to be redirected to the login
page.

When new roles are added, we will need to update the permissions
mechanism.
Merged Script, Question, CommentA, CommentQ models

I have merged the commonalities of the models mentioned in a new
model, Entry. Basically the mentioned models inherit from the Entry
model therefore no changes are required on the server (Flask) side.

In this commit I have also added the admin user type in the permissions
mechanism added before.

Lastly, I have fixed the create user form validation where the
first name, last name, and display name errors do not appear or
disappear when the username has no errors.