Adds unique index to username field.
Fixes models module import to include settings instead of crypto.
Removes generic handleError function from db error on duplicate unique id.
Changes login to require email address instead of username.
Makes email address unique instead of username.
Ties session to session.email variable.
Completes basic functionality for logging in.