fix account profile bugs

is_email_available was broken and causing jquery validation to fail,
preventing users from being able to save the form. Need to add tests for
this. fixes issue #21