Added assignGroupIdsToUser() method to user model. 

Add and edit work consistently. Repopulating in the form in case of an error still needs work. I will get to that.