refactored get_last methods on user and pairsession 

used number_of_sessions in limit calculation