Error 404 for non logged in users

Hello,
Buddypress redirects to error 404 page every time a user tries to access ot a logged-in needed web page (es. http://www.buddypresswebsite.com/members/username/messages/). It causes several problems to users because when they recive an email notification for a private message and follow the link to see the conversation, if the are not logged-in an ugly error page appears (giving the feeling that on the website there is something wrong). Is that possible to: