added edit profile and fixed some bugs