fixed login and added friendships model