added messagesforuser method in backend