OMfixed login check to make it simpler and better
wrote the similarity definition in users class of model.py