Fixed profile information storage in db

Now the user's information goes to the appropriate user's row in the
database. Also, after the profile modal is filled, user is redirected to
home page.