Your plugin works a treat rich – thanks for sharing!
I think ajax refresh is THE thing that’s missing from BuddyPress at the moment. How does the P2 theme do it? Maybe we could “borrow” that functionality.
I wonder if it’s a conflict with another plugin. Here’s what I would do:
Deactivate all other plugins, then re-activate BuddyPress with its default theme. See what happens. If that’s successful, activate your other plugins one by one to find the culprit.
If you can’t login to your site anymore, rename the BuddyPress folder in /plugins/ to something else for now to deactivate it.