fixed login and registering and  added migrations