Further work on model

Changes made to login