Hooked up client side for edit profile

See comments for a full description of this change. The asynchronous
call that only *sometimes* occurs (namely when a user changes his or
her password) made this a non-trivial update. I’ve run through some
test cases and I think my logic is sound though.