Some modeling improvements

Fixed logon sequence to include token creation.
Fixed database schema to constraint non-nullable columns.