added validation to friendship model, changed close sidebar profile criteria